From 3f8f46260df6761c2dfca5c829d94c03c274d7d7 Mon Sep 17 00:00:00 2001 From: Daniel Chetlin Date: Sat, 23 Dec 2000 20:09:49 -0800 Subject: Re: [PATCH blead] Fix segfault in gv_handler/mg_find Message-ID: <20001224040949.B3090@darkstar> p4raw-id: //depot/perl@8236 --- mg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mg.c') 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; -- cgit v1.2.1