summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorDaniel Chetlin <daniel@chetlin.com>2000-12-23 20:09:49 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-28 22:09:25 +0000
commit3f8f46260df6761c2dfca5c829d94c03c274d7d7 (patch)
tree38760239fa9f922ba5ca3189227159badd3f1d3d /gv.c
parent33005217ba51d2bf59b6e5a482ff80b758900633 (diff)
downloadperl-3f8f46260df6761c2dfca5c829d94c03c274d7d7.tar.gz
Re: [PATCH blead] Fix segfault in gv_handler/mg_find
Message-ID: <20001224040949.B3090@darkstar> p4raw-id: //depot/perl@8236
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 3a81248392..3ff7e7f2fa 100644
--- a/gv.c
+++ b/gv.c
@@ -1259,9 +1259,12 @@ CV*
Perl_gv_handler(pTHX_ HV *stash, I32 id)
{
dTHR;
- MAGIC *mg = mg_find((SV*)stash,'c');
+ MAGIC *mg;
AMT *amtp;
+ if (!stash)
+ return Nullcv;
+ mg = mg_find((SV*)stash,'c');
if (!mg) {
do_update:
Gv_AMupdate(stash);