提交 5258c836 编写于 作者: S Skylot

core: fix NPE in loops processing

上级 eb6d145d
......@@ -311,10 +311,13 @@ public class RegionMaker {
AttributesList outAttrs = out.getAttributes();
if (outAttrs.contains(AttributeFlag.LOOP_START)
&& outAttrs.get(AttributeType.LOOP) != loop
&& stack.peekRegion() instanceof LoopRegion
&& RegionUtils.isRegionContainsBlock(stack.peekRegion(), out)) {
// exit to outer loop which already processed
out = null;
&& stack.peekRegion() instanceof LoopRegion) {
LoopRegion outerLoop = (LoopRegion) stack.peekRegion();
if (outerLoop.getBody() == null /* processing not yet finished */
|| RegionUtils.isRegionContainsBlock(outerLoop, out)) {
// exit to outer loop which already processed
out = null;
}
}
stack.push(loopRegion);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册