p4raw-id: //depot/win32/perl@879
if (!entry)
return;
val = HeVAL(entry);
- if (isGV(val) && GvCVu(val) && HvNAME(hv))
+ if (val && isGV(val) && GvCVu(val) && HvNAME(hv))
sub_generation++; /* may be deletion of method from stash */
SvREFCNT_dec(val);
if (HeKLEN(entry) == HEf_SVKEY) {