diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dea67207..40c0b374c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ All notable changes to this project will be documented in this file. - AS 1/2 - Remembering caret position for frames - Cleaner file association - Editing shape points / transform when first edge has no moveTo flag (coordinates 0, 0) +- Exceptions when closing non-ribbon window ### Removed - Windows installer does not associate SWF files anymore as it caused false positives on some AVs. diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java index b16769dba..fac106a30 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java @@ -218,6 +218,9 @@ public class MainFrameClassicMenu extends MainFrameMenu { if (path.equals("_") || path.startsWith("_/")) { return; } + if (menuElements == null) { + return; + } MenuElement menu = menuElements.get(path); if (menu == null) { throw new IllegalArgumentException("Menu " + path + " does not exist"); @@ -252,6 +255,9 @@ public class MainFrameClassicMenu extends MainFrameMenu { @Override public void setMenuChecked(String path, boolean checked) { path = mapping(path); + if (menuElements == null) { + return; + } MenuElement menu = menuElements.get(path); if (menu == null) { throw new IllegalArgumentException("Menu " + path + " does not exist"); @@ -372,6 +378,9 @@ public class MainFrameClassicMenu extends MainFrameMenu { @Override public void setPathVisible(String path, boolean val) { + if (menuElements == null) { + return; + } MenuElement me = menuElements.get(path); if (me instanceof JComponent) { ((JComponent) me).setVisible(val);