X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/c1f3aa6bb1ad83db702e4ef9d3640da20c85628b..9d9ff9a6d62c569a740c816d77c779f220205cb7:/ext/XS-APItest/APItest.xs diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 16a7753..8c44736 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -3725,10 +3725,12 @@ CODE: PERL_SET_CONTEXT(interp); POPSTACK_TO(PL_mainstack); - assert(cxstack_ix >= 0); - dounwind(-1); - POPBLOCK(cxstack); + if (cxstack_ix >= 0) { + dounwind(-1); + POPBLOCK(cxstack); + } LEAVE_SCOPE(0); + PL_scopestack_ix = oldscope; FREETMPS; perl_destruct(interp);