summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-04-20 05:45:48 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-04-21 19:42:04 +0000
commit7b102d90616d2574b3c6a3d1942fcb59fc2aaefb (patch)
treebdce710389ed19380024e4fc10fc0ec2543dcd4a /util.c
parent56fcff86cbedc2a57183ad9c931fd8c116d23e4f (diff)
downloadperl-7b102d90616d2574b3c6a3d1942fcb59fc2aaefb.tar.gz
Fix another segfault case (warn called from UNIVERSAL::DESTROY).
Subject: Re: [perl #21347] segfault in UNIVERSAL::AUTOLOAD Date: Sun, 20 Apr 2003 02:45:48 +0300 Message-ID: <20030419234548.GA849@ratsnest.hole> and Date: Wed, 2 Apr 2003 07:52:28 +0300 Message-ID: <20030402045227.GA1023@ratsnest.hole> p4raw-id: //depot/perl@19300
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index a1eb391b99..5e63d114b8 100644
--- a/util.c
+++ b/util.c
@@ -1247,7 +1247,7 @@ Perl_vwarn(pTHX_ const char* pat, va_list *args)
}
/* if STDERR is tied, use it instead */
- if (PL_stderrgv && (io = GvIOp(PL_stderrgv))
+ if (PL_stderrgv && SvREFCNT(PL_stderrgv) && (io = GvIO(PL_stderrgv))
&& (mg = SvTIED_mg((SV*)io, PERL_MAGIC_tiedscalar))) {
dSP; ENTER;
PUSHMARK(SP);