summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorSimon Cozens <simon@netthink.co.uk>2000-09-07 21:40:38 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-09-08 13:59:35 +0000
commit4f1b75788f3ebf6b0935644632c294e74d6892da (patch)
treee2e2630086647c43a47d8567f42d6b5214e21de9 /pp_hot.c
parent2e50fd82af6a6172bb9f6f6a144b8710ceab7682 (diff)
downloadperl-4f1b75788f3ebf6b0935644632c294e74d6892da.tar.gz
Re: [ID 20000906.004] segfault with bad perl statement
Message-ID: <20000907204038.A15650@deep-dark-truthful-mirror.perlhacker.org> p4raw-id: //depot/perl@7034
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4192f55b30..6f0fd7c7e8 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2876,6 +2876,9 @@ S_method_common(pTHX_ SV* meth, U32* hashp)
name = SvPV(meth, namelen);
sv = *(PL_stack_base + TOPMARK + 1);
+ if (!sv)
+ Perl_croak(aTHX_ "Can't call method \"%s\" on an undefined value", name);
+
if (SvGMAGICAL(sv))
mg_get(sv);
if (SvROK(sv))