From: Nicholas Clark Date: Thu, 13 Apr 2006 13:02:30 +0000 (+0000) Subject: Add a break; to the end of the SAVEt_COP_WARNINGS case, and don't try X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b6dd8c39a431f48c8380b4950f1d9068ea2662e;p=p5sagit%2Fp5-mst-13.2.git Add a break; to the end of the SAVEt_COP_WARNINGS case, and don't try to dereference cop_hints if it's NULL. p4raw-id: //depot/perl@27787 --- diff --git a/sv.c b/sv.c index c9debc6..d490e42 100644 --- a/sv.c +++ b/sv.c @@ -10578,9 +10578,11 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) i = POPINT(ss,ix); TOPINT(nss,ix) = i; ptr = POPPTR(ss,ix); - HINTS_REFCNT_LOCK; - ((COP *)ptr)->cop_hints->refcounted_he_refcnt++; - HINTS_REFCNT_UNLOCK; + if (((COP *)ptr)->cop_hints) { + HINTS_REFCNT_LOCK; + ((COP *)ptr)->cop_hints->refcounted_he_refcnt++; + HINTS_REFCNT_UNLOCK; + } TOPPTR(nss,ix) = ptr; if (i & HINT_LOCALIZE_HH) { hv = (HV*)POPPTR(ss,ix); @@ -10696,6 +10698,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) TOPPTR(nss,ix) = ptr; } } + break; default: Perl_croak(aTHX_ "panic: ss_dup inconsistency (%"IVdf")", (IV) i); }