This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorNicholas Clark <nick@ccl4.org>
Mon, 12 Feb 2007 20:29:43 +0000 (20:29 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 12 Feb 2007 20:29:43 +0000 (20:29 +0000)
[ 29832]
Avoid a SEGV in DBI's test suite, discovered by Andreas.
Probably need to go through and audit to see if there are analagous
places that need tweaking.
p4raw-link: @29832 on //depot/maint-5.8/perl: 42a5fb548791baca026f93036e91df33f2efb5be

p4raw-id: //depot/perl@30240
p4raw-integrated: from //depot/maint-5.8/perl@29832 'merge in' perl.c
(@29809..)

perl.c

diff --git a/perl.c b/perl.c
index fa1407f..7a53b72 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -5116,7 +5116,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList)
 {
     dVAR;
     SV *atsv;
-    const line_t oldline = CopLINE(PL_curcop);
+    const line_t oldline = PL_curcop ? CopLINE(PL_curcop) : 0;
     CV *cv;
     STRLEN len;
     int ret;