summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 399410faa0..284fe7efa3 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3780,7 +3780,7 @@ S_regmatch(pTHX_ regexp *rex, regnode *prog)
{
I32 type;
type = OP(scan);
- if (OP(next) != type) /* No choice. */
+ if (!next || OP(next) != type) /* No choice. */
next = inner; /* Avoid recursion. */
else {
const I32 lastparen = *PL_reglastparen;