Skip to content

Commit

Permalink
Make sure accessing the non-existent return value of unwrap doesn't c…
Browse files Browse the repository at this point in the history
…ause Null PMC Access by handing back Nil.
  • Loading branch information
jnthn committed Apr 9, 2009
1 parent 531fe43 commit 04f63fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/classes/Routine.pir
Expand Up @@ -99,7 +99,8 @@ wrappable executable objects.
$P1 = getprop '$!wrap_handle', $P0
setprop current, '$!wrap_handle', $P1
unwrap_done:
.return ()
$P0 = new 'Nil'
.return ($P0)

handle_not_found:
'die'('Could not find unwrap handle ', handle, ' on sub ', self)
Expand Down

0 comments on commit 04f63fc

Please sign in to comment.