summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pad.c b/pad.c
index 51592d0937..07f994ae49 100644
--- a/pad.c
+++ b/pad.c
@@ -1501,8 +1501,8 @@ Perl_cv_clone(pTHX_ CV *proto)
"Variable \"%s\" is not available", SvPVX_const(namesv));
sv = NULL;
}
- else {
- assert(!SvPADSTALE(sv));
+ /* 'my $x if $y' can leave $x stale even in an active sub */
+ else if (!SvPADSTALE(sv)) {
SvREFCNT_inc_simple_void_NN(sv);
}
}