This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PVFMs don't need CvDEPTH, and PVCVs don't use SvIVX, so moving
[perl5.git] / op.c
diff --git a/op.c b/op.c
index 85e8852..591ffa7 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4269,7 +4269,7 @@ Perl_cv_undef(pTHX_ CV *cv)
 #endif
 
     if (!CvISXSUB(cv) && CvROOT(cv)) {
-       if (CvDEPTH(cv))
+       if (SvTYPE(cv) == SVt_PVCV && CvDEPTH(cv))
            Perl_croak(aTHX_ "Can't undef active subroutine");
        ENTER;