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 {
debugInfoParser.process();
if (insnArr.length != 0) {
int line = insnArr[0].getSourceLine();
if (line != 0) {
mth.setSourceLine(line - 1);
for (InsnNode insn : insnArr) {
if (insn != null) {
int line = insn.getSourceLine();
if (line != 0) {
mth.setSourceLine(line - 1);
}
break;
}
}
}
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