This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t let gv.c:gv_try_downgrade touch PL_statgv
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index 476afc5..4e0611b 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -3322,6 +3322,7 @@ Perl_gv_try_downgrade(pTHX_ GV *gv)
            !GvSV(gv) && !GvAV(gv) && !GvHV(gv) && !GvIOp(gv) && !GvFORM(gv) &&
            GvEGVx(gv) == gv && (stash = GvSTASH(gv))))
        return;
+    if (gv == PL_statgv) return;
     if (SvMAGICAL(gv)) {
         MAGIC *mg;
        /* only backref magic is allowed */