From e5a11a577b9b842e5e85c1b3dff1d34f07df6c3c Mon Sep 17 00:00:00 2001 From: Jackkal Date: Fri, 10 Jul 2015 23:55:36 +0200 Subject: [PATCH] calculateDebugFileLine: fix null pointer exception --- .../src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index 64afffcfe..bb171d99f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -704,7 +704,9 @@ public class AVM2Code implements Cloneable { //This avoids bogus functions used in obfuscation or special compilers that can lead to infinite recursion. if ((pos + 1 < code.size()) && !(code.get(pos + 1).definition instanceof PopIns)) { MethodBody innerBody = abc.findBody(ins.operands[0]); - innerBody.getCode().calculateDebugFileLine(debugFile, debugLine, 0, abc, new HashSet<>()); + if (innerBody != null) { //Ignore functions without body + innerBody.getCode().calculateDebugFileLine(debugFile, debugLine, 0, abc, new HashSet<>()); + } } }