mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 09:00:55 +00:00
Fixed: Exceptions when closing non-ribbon window
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user