Skip to content

Commit

Permalink
improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed Mar 3, 2019
1 parent 0251b81 commit 0077b39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion java/src/jmri/jmrix/swing/ConnectionsPreferencesPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public ConnectionsPreferencesPanel() {
removeTab(null, i);
} else if (evt.getOldValue() == null) {
for (JmrixConfigPane pane : this.configPanes) {
if (pane.getCurrentObject().equals(evt.getNewValue())) {
if (pane.getCurrentObject() == null ) {
log.error("did not expect pane.getCurrentObject()==null here for {} {} {}", i, evt.getNewValue(), configPanes);
} else if (pane.getCurrentObject().equals(evt.getNewValue())) {
return; // don't add the connection again
}
}
Expand Down

0 comments on commit 0077b39

Please sign in to comment.