From: Nicholas Clark Date: Thu, 29 Dec 2005 00:19:01 +0000 (+0000) Subject: A GVs stash can be NULL, so don't call macros that assume otherwise X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7fa3a4ab65fb537f19afacdba68180c51faa544e;p=p5sagit%2Fp5-mst-13.2.git A GVs stash can be NULL, so don't call macros that assume otherwise without checking. p4raw-id: //depot/perl@26518 --- diff --git a/pp.c b/pp.c index 2e9234b..d679f6a 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;