From: Rafael Garcia-Suarez Date: Wed, 7 Jul 2004 17:48:29 +0000 (+0000) Subject: Make Perl_sv_utf8_upgrade_flags tolerate PL_sv_undef X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=808c356fac3636c92b02c9645ce5534d6ad58b38;p=p5sagit%2Fp5-mst-13.2.git Make Perl_sv_utf8_upgrade_flags tolerate PL_sv_undef as an argument. p4raw-id: //depot/perl@23063 --- diff --git a/sv.c b/sv.c index 1cca051..df384e7 100644 --- a/sv.c +++ b/sv.c @@ -3937,6 +3937,8 @@ Perl_sv_utf8_upgrade_flags(pTHX_ register SV *sv, I32 flags) U8 *s, *t, *e; int hibit = 0; + if (sv == &PL_sv_undef) + return 0; if (!SvPOK(sv)) { STRLEN len = 0; (void) SvPV_force(sv,len);