Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
more robust getcurrenv
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Sep 29, 2009
1 parent 6b82566 commit 4696621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pmc/luathread.pmc
Expand Up @@ -26,7 +26,7 @@ This implementation is based on C<Parrot::Coroutine>.
static PMC* getcurrenv(PARROT_INTERP) {
PMC *env = NULL;
PMC * const sub = Parrot_pcc_get_sub(interp, CURRENT_CONTEXT(interp));
if (sub) {
if (sub && PMC_type(sub) == dynpmc_LuaFunction) {
env = _LuaFunction_get_environment(interp, sub);
}
return env;
Expand Down

0 comments on commit 4696621

Please sign in to comment.