Commit e8fd1e1d authored by Skylot's avatar Skylot

core: fix debug info processing NPE

parent 2b7f8931
...@@ -19,9 +19,14 @@ public class DebugInfoVisitor extends AbstractVisitor { ...@@ -19,9 +19,14 @@ public class DebugInfoVisitor extends AbstractVisitor {
debugInfoParser.process(); debugInfoParser.process();
if (insnArr.length != 0) { if (insnArr.length != 0) {
int line = insnArr[0].getSourceLine(); for (InsnNode insn : insnArr) {
if (line != 0) { if (insn != null) {
mth.setSourceLine(line - 1); int line = insn.getSourceLine();
if (line != 0) {
mth.setSourceLine(line - 1);
}
break;
}
} }
} }
if (!mth.getReturnType().equals(ArgType.VOID)) { if (!mth.getReturnType().equals(ArgType.VOID)) {
......
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