summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorRick Delaney <rick@consumercontact.com>2008-06-14 04:51:01 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-06-15 15:20:41 +0000
commit49c95d583ee26e3f8629868ab6da323b7c424640 (patch)
tree86172b333c6e0880f5a4252bc2f84c971849d5a1 /pp.h
parentcd1a9f552fc30b37bf1b6c770f1367c112fd1b1d (diff)
downloadperl-49c95d583ee26e3f8629868ab6da323b7c424640.tar.gz
[perl #55786] [PATCH blead] Re: Overload Segfaulting
From: Rick Delaney (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-22068-1213469460-652.55786-75-0@perl.org> p4raw-id: //depot/perl@34055
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp.h b/pp.h
index 7b5f322f1c..8345af4b80 100644
--- a/pp.h
+++ b/pp.h
@@ -487,9 +487,9 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
/* SV* ref causes confusion with the member variable
changed SV* ref to SV* tmpRef */
-#define RvDEEPCP(rv) STMT_START { SV* tmpRef=SvRV(rv); \
- if (SvREFCNT(tmpRef)>1) { \
- SvRV_set(rv, AMG_CALLun(rv,copy)); \
+#define RvDEEPCP(rv) STMT_START { SV* tmpRef=SvRV(rv); SV* rv_copy; \
+ if (SvREFCNT(tmpRef)>1 && (rv_copy = AMG_CALLun(rv,copy))) { \
+ SvRV_set(rv, rv_copy); \
SvREFCNT_dec(tmpRef); \
} } STMT_END