Skip to content

Commit

Permalink
Check that editorWindow is nonnull before trying to use it.
Browse files Browse the repository at this point in the history
  • Loading branch information
uckelman committed Sep 13, 2023
1 parent 953c5f0 commit 5b41781
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vassal-app/src/main/java/VASSAL/configure/ConfigureTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -625,17 +625,21 @@ private List<DefaultMutableTreeNode> getSearchNodes(DefaultMutableTreeNode root)


private void notifyUpdate(final Configurable target) {
if (target instanceof AbstractConfigurable) {
if (editorWindow.getListKeyCommands() != null) {
editorWindow.getListKeyCommands().updateConfigurable((AbstractConfigurable)target);
if (editorWindow != null) {
if (target instanceof AbstractConfigurable) {
if (editorWindow.getListKeyCommands() != null) {
editorWindow.getListKeyCommands().updateConfigurable((AbstractConfigurable)target);
}
}
}
}

private void notifyDelete(final Configurable target) {
if (target instanceof AbstractConfigurable) {
if (editorWindow.getListKeyCommands() != null) {
editorWindow.getListKeyCommands().deleteConfigurable((AbstractConfigurable)target);
if (editorWindow != null) {
if (target instanceof AbstractConfigurable) {
if (editorWindow.getListKeyCommands() != null) {
editorWindow.getListKeyCommands().deleteConfigurable((AbstractConfigurable)target);
}
}
}
}
Expand Down

0 comments on commit 5b41781

Please sign in to comment.