Re: Smoke [5.9.4] 27728 FAIL(F) MSWin32 WinXP/.Net SP2 (x86/2 cpu)
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 6 Apr 2006 14:32:50 +0000 (16:32 +0200)
committerSteve Hay <SteveHay@planit.com>
Thu, 6 Apr 2006 14:55:40 +0000 (14:55 +0000)
Message-ID: <20060406143250.5a7de4b8@grubert.mandriva.com>

p4raw-id: //depot/perl@27731

mg.c

diff --git a/mg.c b/mg.c
index 82f63c007dac152c25b366fe758ba775449c9fc0..830e0396ff11a6fd5c0f9830e2427c24c57be105 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -1053,7 +1053,7 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg)
     if (!len) {
        SV ** const valp = hv_fetch(GvHVn(PL_envgv), ptr, klen, FALSE);
        if (valp)
-           s = SvPV_const(*valp, len);
+           s = SvOK(*valp) ? SvPV_const(*valp, len) : "";
     }
 #endif