X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/8c34e50dccefe2a0539ba2339a2889bb841986c2..9e7945ee50c30a17a84968fb0c7e5c38223af6f9:/mro.c diff --git a/mro.c b/mro.c index 2d1d887..be2038f 100644 --- a/mro.c +++ b/mro.c @@ -578,6 +578,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash) revmeta->cache_gen++; if(revmeta->mro_nextmethod) hv_clear(revmeta->mro_nextmethod); + if (!SvOBJECT(revstash)) SvSTASH(revstash) = NULL; (void) hv_store( @@ -1356,6 +1357,7 @@ Perl_mro_method_changed_in(pTHX_ HV *stash) mrometa->cache_gen++; if(mrometa->mro_nextmethod) hv_clear(mrometa->mro_nextmethod); + if (!SvOBJECT(revstash)) SvSTASH(revstash) = NULL; } }