X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=indirect.xs;h=511d9cd81df75d069f87cbe101929a9af17117e0;hp=de41fa61802e60fff95101fd70cea563d3328313;hb=217e4a123f681f91cd2cfb1e6eb001a9cb757d66;hpb=3ce3f8f7be47150f9d727ef67cb8bb7be039e68d diff --git a/indirect.xs b/indirect.xs index de41fa6..511d9cd 100644 --- a/indirect.xs +++ b/indirect.xs @@ -587,7 +587,8 @@ STATIC OP *indirect_ck_const(pTHX_ OP *o) { * when we already had a match because __PACKAGE__ can only appear in * direct method calls ("new __PACKAGE__" is a syntax error). */ len = SvCUR(sv); - if (len == (STRLEN) HvNAMELEN_get(PL_curstash) + if (PL_curstash + && len == (STRLEN) HvNAMELEN_get(PL_curstash) && memcmp(SvPVX(sv), HvNAME_get(PL_curstash), len) == 0) { STRLEN pos_pkg; SV *pkg = sv_newmortal();