summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-28 06:40:29 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-08-28 06:40:29 -0700
commit56117e3ef4ef2c7986c400f86f321f22f261571a (patch)
treef32305706f798be08fe9ef39d33ca6891f7ed14d /gv.c
parent18691622911f2e18df42a5a98ea4c42386f4e558 (diff)
downloadperl-56117e3ef4ef2c7986c400f86f321f22f261571a.tar.gz
Fix crash when lex subs are used for overload
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 7e3058dadd..e4d6acab42 100644
--- a/gv.c
+++ b/gv.c
@@ -2553,7 +2553,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
numifying instead of C's "+0". */
gv = Perl_gv_fetchmeth_pvn(aTHX_ stash, cooky, l, -1, 0);
cv = 0;
- if (gv && (cv = GvCV(gv))) {
+ if (gv && (cv = GvCV(gv)) && CvGV(cv)) {
if(GvNAMELEN(CvGV(cv)) == 3 && strEQ(GvNAME(CvGV(cv)), "nil")){
const char * const hvname = HvNAME_get(GvSTASH(CvGV(cv)));
if (hvname && HEK_LEN(HvNAME_HEK(GvSTASH(CvGV(cv)))) == 8