Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Couple of corrections to find_dispatcher op.
  • Loading branch information
jnthn committed Jul 10, 2011
1 parent 0373976 commit db2ce31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ops/perl6.ops
Expand Up @@ -802,7 +802,7 @@ inline op perl6_find_dispatcher(out PMC) :base_core {
while (!PMC_IS_NULL(ctx)) {
/* Do we have a dispatcher here? */
PMC *lexpad = Parrot_pcc_get_lex_pad(interp, ctx);
if (VTABLE_exists_keyed_str(interp, lexpad, dispatcher_str)) {
if (!PMC_IS_NULL(lexpad) && VTABLE_exists_keyed_str(interp, lexpad, dispatcher_str)) {
dispatcher = VTABLE_get_pmc_keyed_str(interp, lexpad, dispatcher_str);
if (!REPR(dispatcher)->defined(interp, dispatcher)) {
/* Need to vivify it. */
Expand All @@ -819,6 +819,7 @@ inline op perl6_find_dispatcher(out PMC) :base_core {
cappy = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp), old_ctx);
dispatcher = VTABLE_get_pmc_keyed_int(interp, cappy, 0);
VTABLE_set_pmc_keyed_str(interp, lexpad, dispatcher_str, dispatcher);
}
break;
}
Expand Down

0 comments on commit db2ce31

Please sign in to comment.