summaryrefslogtreecommitdiff
path: root/mg.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
commit6fccc2c0549384406273ef308cca1293d0f3aa37 (patch)
tree38760239fa9f922ba5ca3189227159badd3f1d3d /mg.c
parentdc917a9d6b95a9949b35e1402917f446df533aca (diff)
downloadperl-6fccc2c0549384406273ef308cca1293d0f3aa37.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 'mg.c')
-rw-r--r--mg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index 0ac07420f4..821c32537d 100644
--- a/mg.c
+++ b/mg.c
@@ -261,6 +261,8 @@ MAGIC*
Perl_mg_find(pTHX_ SV *sv, int type)
{
MAGIC* mg;
+ if (!sv)
+ return 0;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
if (mg->mg_type == type)
return mg;