Skip to content

Commit e325572

Browse files
committed
Address NPE in lookahead evaluation.
1 parent 83ca19a commit e325572

File tree

1 file changed

+3
-1
lines changed
  • core/src/main/java/com/github/simy4/coregex/core

1 file changed

+3
-1
lines changed

core/src/main/java/com/github/simy4/coregex/core/Coregex.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ public void close() throws RewindException {
368368
if (null != name) {
369369
parent.groups.put(name, group);
370370
}
371-
parent.finalizeWithLookbehind(lookbehind);
371+
if (null != lookbehind) {
372+
parent.finalizeWithLookbehind(lookbehind);
373+
}
372374
}
373375
}
374376

0 commit comments

Comments
 (0)