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.
[perl5.git] / 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;