summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.c b/op.c
index 3bd664862b..747f1c5779 100644
--- a/op.c
+++ b/op.c
@@ -5575,6 +5575,8 @@ Perl_ck_grep(pTHX_ OP *o)
OP* k;
o = ck_sort(o);
kid = cLISTOPo->op_first->op_sibling;
+ if (!cUNOPx(kid)->op_next)
+ Perl_croak(aTHX_ "panic: ck_grep");
for (k = cUNOPx(kid)->op_first; k; k = k->op_next) {
kid = k;
}