diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java index 80b16f3bd..d31698a88 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java @@ -2400,6 +2400,9 @@ public class ActionScriptParser { private static void initPlayer() throws IOException, InterruptedException { if (playerABCs.isEmpty()) { + if (Configuration.getPlayerSWC() == null) { + throw new IOException("Player SWC library not found, please place it to " + Configuration.getPlayerSWC()); + } SWC swc = new SWC(new FileInputStream(Configuration.getPlayerSWC())); SWF swf = new SWF(swc.getSWF("library.swf"), true); for (Tag t : swf.tags) { diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java index 626687f86..9a1c09e60 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java @@ -57,6 +57,10 @@ public class DirectEditingTest extends FileTestBase { @Test(dataProvider = "provideFiles") public void testDirectEditing(String fileName) throws IOException, InterruptedException, AVM2ParseException, CompilationException { + File playerSWC = Configuration.getPlayerSWC(); + if (playerSWC == null) { + throw new IOException("Player SWC library not found, please place it to " + Configuration.getPlayerSWC()); + } try { SWF swf = new SWF(new BufferedInputStream(new FileInputStream(TESTDATADIR + File.separator + fileName)), false); if (swf.isAS3()) { @@ -124,7 +128,7 @@ public class DirectEditingTest extends FileTestBase { } } } catch (Exception ex) { - fail("Exception during decompilation: " + fileName + " " + ex.getMessage()); + fail("Exception during decompilation: " + fileName, ex); } }