Skip to content

Commit

Permalink
don't try to get slot of an NULL attribute name
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed May 19, 2014
1 parent 3818135 commit 845bb6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/6model/reprs/P6opaque.c
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ static void spesh(MVMThreadContext *tc, MVMSTable *st, MVMSpeshGraph *g, MVMSpes
case MVM_OP_getattrs_s: {
MVMSpeshFacts *ch_facts = MVM_spesh_get_facts(tc, g, ins->operands[2]);
MVMString *name = spesh_attr_name(tc, g, ins->operands[3], opcode == MVM_OP_getattrs_s);
if (ch_facts->flags & MVM_SPESH_FACT_KNOWN_TYPE && ch_facts->type) {
if (name && ch_facts->flags & MVM_SPESH_FACT_KNOWN_TYPE && ch_facts->type) {
MVMint64 slot = try_get_slot(tc, repr_data, ch_facts->type, name);
if (slot >= 0 && repr_data->flattened_stables[slot]) {
MVMSTable *flat_st = repr_data->flattened_stables[slot];
Expand Down

0 comments on commit 845bb6f

Please sign in to comment.