summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index f35c1805e5..cb7fbfb368 100644
--- a/hv.c
+++ b/hv.c
@@ -841,7 +841,7 @@ hv_free_ent(HV *hv, register HE *entry)
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) {