From: Richard Soderberg Date: Thu, 24 May 2001 05:51:52 +0000 (-0700) Subject: Stop segfault in mg.c:636 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bdc14a33b4456235ee9037fa8105286d0352a098;p=p5sagit%2Fp5-mst-13.2.git Stop segfault in mg.c:636 Message-ID: p4raw-id: //depot/perl@10194 --- diff --git a/mg.c b/mg.c index b68a52e..0c865bc 100644 --- a/mg.c +++ b/mg.c @@ -633,7 +633,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) PL_tainted = FALSE; } sv_setpvn(sv, s, i); - if (DO_UTF8(PL_reg_sv) && is_utf8_string((U8*)s, i)) + if (PL_reg_sv && DO_UTF8(PL_reg_sv) && is_utf8_string((U8*)s, i)) SvUTF8_on(sv); else SvUTF8_off(sv);