From: Vincent Pit Date: Sat, 20 Sep 2008 14:01:08 +0000 (+0200) Subject: Skip wizard destructor during global destruction X-Git-Tag: v0.20~14 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=b5acd232730bf91f384b43bc867ec1cb4d3dd147;p=perl%2Fmodules%2FVariable-Magic.git Skip wizard destructor during global destruction --- diff --git a/Magic.xs b/Magic.xs index 5e76f8a..1ac63cb 100644 --- a/Magic.xs +++ b/Magic.xs @@ -623,6 +623,9 @@ STATIC int vmg_wizard_free(pTHX_ SV *wiz, MAGIC *mg) { MGWIZ *w; dMY_CXT; + if (PL_dirty) /* during global destruction, the context is already freed */ + return 0; + w = SV2MGWIZ(wiz); if (hv_delete(MY_CXT.wizz, buf, sprintf(buf, "%u", w->sig), 0)) {