1df5f7c195 added checks to newGP to account for PL_curcop being NULL.
19bad673 inadvertently removed the NULL check for non-threaded builds,
except in one spot.
Since S_cop_free now sets PL_curcop to NULL as of the previous commit
(something
1df5f7c195 was meant to do but didn’t), this check is a
good idea, even though PL_curcop is never NULL here.
See also <
20130805200313.GS3729@plum.flirble.org>.
len = 0;
}
#else
- if(PL_curcop)
+ if(PL_curcop) {
gp->gp_line = CopLINE(PL_curcop); /* 0 otherwise Newxz */
- filegv = CopFILEGV(PL_curcop);
- if (filegv) {
- file = GvNAME(filegv)+2;
- len = GvNAMELEN(filegv)-2;
- } else {
+ filegv = CopFILEGV(PL_curcop);
+ if (filegv) {
+ file = GvNAME(filegv)+2;
+ len = GvNAMELEN(filegv)-2;
+ }
+ else goto no_file;
+ }
+ else {
+ no_file:
file = "";
len = 0;
}