summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-04-03 07:22:50 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-04-03 07:22:50 +0000
commit16bdeea22f8cedc459c05644ea5e42bd8370b42c (patch)
treeeb9233c8dbdc504bcd677f3c6f9ef15121240cf6 /hv.c
parent13c6d55afa635942d3703ea1d73eb249186edfd4 (diff)
downloadperl-16bdeea22f8cedc459c05644ea5e42bd8370b42c.tar.gz
[win32] fixup hv_free_ent() to not fail on null HeVAL()
p4raw-id: //depot/win32/perl@866
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index e7d2075378..f35c1805e5 100644
--- a/hv.c
+++ b/hv.c
@@ -836,11 +836,14 @@ newHV(void)
void
hv_free_ent(HV *hv, register HE *entry)
{
+ SV *val;
+
if (!entry)
return;
- if (isGV(HeVAL(entry)) && GvCVu(HeVAL(entry)) && HvNAME(hv))
+ val = HeVAL(entry);
+ if (isGV(val) && GvCVu(val) && HvNAME(hv))
sub_generation++; /* may be deletion of method from stash */
- SvREFCNT_dec(HeVAL(entry));
+ SvREFCNT_dec(val);
if (HeKLEN(entry) == HEf_SVKEY) {
SvREFCNT_dec(HeKEY_sv(entry));
Safefree(HeKEY_hek(entry));