From 9289f461126f104eef437e7c6d2f1f640f935646 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 7 Aug 2006 14:10:15 +0000 Subject: [PATCH] We shouldn't try to decrement the refcount of PL_warnhook if it has been set to PERL_WARNHOOK_FATAL. p4raw-id: //depot/perl@28669 --- mg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mg.c b/mg.c index 8e00fb2..3f2fd5a 100644 --- a/mg.c +++ b/mg.c @@ -1384,7 +1384,8 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg) Perl_croak(aTHX_ "No such hook: %s", s); i = 0; if (*svp) { - to_dec = *svp; + if (*svp != PERL_WARNHOOK_FATAL) + to_dec = *svp; *svp = NULL; } } -- 2.7.4