summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-12-29 00:19:01 +0000
committerNicholas Clark <nick@ccl4.org>2005-12-29 00:19:01 +0000
commit7fa3a4ab65fb537f19afacdba68180c51faa544e (patch)
tree66df48bb3a7371757e5cc6bfa826ebed3da513c7
parente3d998840fa41946cf8ee609337ef4edea761fd2 (diff)
downloadperl-7fa3a4ab65fb537f19afacdba68180c51faa544e.tar.gz
A GVs stash can be NULL, so don't call macros that assume otherwise
without checking. p4raw-id: //depot/perl@26518
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 2e9234bf6d..d679f6ac21 100644
--- a/pp.c
+++ b/pp.c
@@ -598,7 +598,8 @@ PP(pp_gelem)
break;
case 'P':
if (strEQ(second_letter, "ACKAGE")) {
- const HEK * const hek = HvNAME_HEK(GvSTASH(gv));
+ const HV * const stash = GvSTASH(gv);
+ const HEK * const hek = stash ? HvNAME_HEK(stash) : NULL;
sv = hek ? newSVhek(hek) : newSVpvn("__ANON__", 8);
}
break;