Commit b1588583 authored by Skylot's avatar Skylot

fix: prevent NPE while processing try/catch regions (#673)

parent d6737860
......@@ -954,6 +954,9 @@ public class RegionMaker {
Set<BlockNode> exits = new HashSet<>();
for (BlockNode splitter : splitters) {
for (BlockNode handler : blocks) {
if (handler.contains(AFlag.REMOVE)) {
continue;
}
List<BlockNode> s = splitter.getSuccessors();
if (s.isEmpty()) {
LOG.debug(ErrorsCounter.formatMsg(mth, "No successors for splitter: " + splitter));
......
......@@ -432,6 +432,9 @@ public class BlockUtils {
if (b1 == null || b2 == null) {
return null;
}
if (b1.getDomFrontier() == null || b2.getDomFrontier() == null) {
return null;
}
BitSet b = new BitSet();
b.or(b1.getDomFrontier());
b.and(b2.getDomFrontier());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment