avoid coredump on diagnostics when STDERR is closed
Gurusamy Sarathy [Thu, 16 Dec 1999 08:26:00 +0000 (08:26 +0000)]
p4raw-id: //depot/perl@4680

perl.h

diff --git a/perl.h b/perl.h
index dc72ffe..8a6505e 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1868,6 +1868,7 @@ Gid_t getegid (void);
 
 #ifndef Perl_error_log
 #  define Perl_error_log       (PL_stderrgv                    \
+                                && IoOFP(GvIOp(PL_stderrgv))   \
                                 ? IoOFP(GvIOp(PL_stderrgv))    \
                                 : PerlIO_stderr())
 #endif