This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid a SEGV in DBI's test suite, discovered by Andreas.
authorNicholas Clark <nick@ccl4.org>
Mon, 15 Jan 2007 16:30:37 +0000 (16:30 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 15 Jan 2007 16:30:37 +0000 (16:30 +0000)
Probably need to go through and audit to see if there are analagous
places that need tweaking.

p4raw-id: //depot/maint-5.8/perl@29832

perl.c

diff --git a/perl.c b/perl.c
index 7886c40..eb63a03 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -5230,7 +5230,7 @@ void
 Perl_call_list(pTHX_ I32 oldscope, AV *paramList)
 {
     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;