diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/perlhost.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h index 02ecf109a1..e8f5fb4928 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -1757,6 +1757,10 @@ restart: LEAVE; FREETMPS; PL_curstash = PL_defstash; + if (PL_curstash != PL_defstash) { + SvREFCNT_dec(PL_curstash); + PL_curstash = (HV *)SvREFCNT_inc(PL_defstash); + } if (PL_endav && !PL_minus_c) call_list(oldscope, PL_endav); status = STATUS_EXIT; |