Skip to content

Commit

Permalink
Detect a Null PMC Access condition that could occur and throw a more …
Browse files Browse the repository at this point in the history
…meaningful exception.
  • Loading branch information
jnthn committed Aug 14, 2009
1 parent 0d4fe08 commit 58bef37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pmc/p6invocation.pmc
Expand Up @@ -220,6 +220,8 @@ pmclass P6Invocation need_ext dynpmc group perl6_group {
SETATTR_P6Invocation_first_candidate(interp, SELF, PMCNULL);

/* Invoke it, then fudge ourself into its lexpad. */
if (PMC_IS_NULL(first_candidate))
Parrot_ex_throw_from_c_args(interp, next, 1, "No candidates found to invoke");
addr = VTABLE_invoke(interp, first_candidate, next);
lexpad = CONTEXT(interp)->lex_pad;
if (!PMC_IS_NULL(lexpad) && VTABLE_exists_keyed_str(interp, lexpad, lexname))
Expand Down

0 comments on commit 58bef37

Please sign in to comment.