]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Really don't try to read the context before we're sure we are not dirty
authorVincent Pit <vince@profvince.com>
Sat, 20 Sep 2008 22:57:06 +0000 (00:57 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 20 Sep 2008 22:57:06 +0000 (00:57 +0200)
Magic.xs

index b4ff2439b9d5ef70f8e6bd567c6d82c1f77b5360..c692014ba849694ab98fb37e8f47ddb5726f53c9 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
@@ -637,7 +637,6 @@ STATIC I32 vmg_svt_val(pTHX_ IV action, SV *sv) {
 STATIC int vmg_wizard_free(pTHX_ SV *wiz, MAGIC *mg) {
  char buf[8];
  MGWIZ *w;
- dMY_CXT;
 
  if (PL_dirty) /* during global destruction, the context is already freed */
   return 0;
@@ -649,6 +648,7 @@ STATIC int vmg_wizard_free(pTHX_ SV *wiz, MAGIC *mg) {
  w->owner = NULL;
 #endif /* VMG_MULTIPLICITY */
 
+ dMY_CXT;
  if (hv_delete(MY_CXT.wizz, buf, sprintf(buf, "%u", w->sig), 0)) {
   --MY_CXT.count;
  }