From: Simon Cozens Date: Thu, 7 Sep 2000 20:40:38 +0000 (+0100) Subject: Re: [ID 20000906.004] segfault with bad perl statement X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f1b75788f3ebf6b0935644632c294e74d6892da;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20000906.004] segfault with bad perl statement Message-ID: <20000907204038.A15650@deep-dark-truthful-mirror.perlhacker.org> p4raw-id: //depot/perl@7034 --- diff --git a/pp_hot.c b/pp_hot.c index 4192f55..6f0fd7c 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))