Fix [perl #52740] crash when localizing a symtab entry
Rafael Garcia-Suarez [Sat, 10 May 2008 15:58:32 +0000 (15:58 +0000)]
p4raw-id: //depot/perl@33807

sv.c

diff --git a/sv.c b/sv.c
index 8f94350..44307d4 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -3718,8 +3718,10 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags)
                GvMULTI_on(dstr);
                return;
            }
-           glob_assign_glob(dstr, sstr, dtype);
-           return;
+           if (isGV_with_GP(sstr)) {
+               glob_assign_glob(dstr, sstr, dtype);
+               return;
+           }
        }
 
        if (dtype >= SVt_PV) {