diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index 6954cd10d..7c0168ed5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -1145,13 +1145,17 @@ public final class SWF implements SWFContainerItem, Timelined { } }; int currentIndex = index.getAndIncrement(); - synchronized (ABC.class) { - eventListener.handleExportingEvent("script", currentIndex, count, path); + if (eventListener != null) { + synchronized (ABC.class) { + eventListener.handleExportingEvent("script", currentIndex, count, path); + } } new RetryTask(rio, handler).run(); - synchronized (ABC.class) { - long time = stopTime - startTime; - eventListener.handleExportedEvent("script", currentIndex, count, path + ", " + Helper.formatTimeSec(time)); + if (eventListener != null) { + synchronized (ABC.class) { + long time = stopTime - startTime; + eventListener.handleExportedEvent("script", currentIndex, count, path + ", " + Helper.formatTimeSec(time)); + } } return rio.result; } diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java index fb35de6d3..5e975779a 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java @@ -1,18 +1,19 @@ /* * Copyright (C) 2010-2015 JPEXS, All rights reserved. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.configuration.Configuration; @@ -114,7 +115,7 @@ public class ExportTest { return this; } - }, fdir.getAbsolutePath(), exportMode, false); + }, fdir.getAbsolutePath(), exportMode, false, null); } catch (Exception ex) { fail(); }