openlcb / OpenLCB_Java

A git-managed copy of the SVN-based Java prototype implementation of OpenLCB. This implementation operates inside JMRI.
6 stars 9 forks source link

Fix NPE when Network Tree window closing overlaps with event #234

Closed bobjacobsen closed 9 months ago

bobjacobsen commented 9 months ago

Very, very rarely I was encountering an NPE when closing the Network Tree (Configure Nodes) window.

The cause was a PropertyChangeEvent arriving after the release() call had (in theory) closed everything down. That nulled-out the timer reference. This detects that condition and ignores the event with a warning in the log.

Not clear to me whether that log message should be a warning or some lower level, though.