summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorRichard Soderberg <p5-authors@crystalflame.net>2001-05-23 22:51:52 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-24 13:02:49 +0000
commitbdc14a33b4456235ee9037fa8105286d0352a098 (patch)
treeace17d69e3188742da040747b159690846441ff8 /mg.c
parent371ddd858c2651cdea3fbca05e7054367a51f6ac (diff)
downloadperl-bdc14a33b4456235ee9037fa8105286d0352a098.tar.gz
Stop segfault in mg.c:636
Message-ID: <NAEKLNAAHLMBPMPNBMLEGEPGDEAA.rs@crystalflame.net> p4raw-id: //depot/perl@10194
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index b68a52e1d2..0c865bc33f 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);