This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add op_other to B::Concise -debug output for LOGOPs
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index fc4393e..9f0b57e 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -176,9 +176,10 @@ Perl_newGP(pTHX_ GV *const gv)
     gp->gp_sv = newSV(0);
 #endif
 
-    /* PL_curcop should never be null here. */
-    assert(PL_curcop);
-    /* But for non-debugging builds play it safe */
+    /* PL_curcop may be null here.  E.g.,
+       INIT { bless {} and exit }
+       frees INIT before looking up DESTROY (and creating *DESTROY)
+    */
     if (PL_curcop) {
        gp->gp_line = CopLINE(PL_curcop); /* 0 otherwise Newxz */
 #ifdef USE_ITHREADS