summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index f51f782486..13bcbbfba6 100644
--- a/gv.c
+++ b/gv.c
@@ -176,6 +176,9 @@ 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 */
if (PL_curcop) {
gp->gp_line = CopLINE(PL_curcop); /* 0 otherwise Newxz */
#ifdef USE_ITHREADS