Changeset 12507 in josm for trunk/src/org


Ignore:
Timestamp:
2017-07-24T23:58:27+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15062 - avoid NPE when restarting JOSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r12128 r12507  
    11591159     */
    11601160    public static boolean addAndFireMapFrameListener(MapFrameListener listener) {
    1161         return mainPanel.addAndFireMapFrameListener(listener);
     1161        return mainPanel != null && mainPanel.addAndFireMapFrameListener(listener);
    11621162    }
    11631163
     
    11701170     */
    11711171    public static boolean addMapFrameListener(MapFrameListener listener) {
    1172         return mainPanel.addMapFrameListener(listener);
     1172        return mainPanel != null && mainPanel.addMapFrameListener(listener);
    11731173    }
    11741174
     
    11801180     */
    11811181    public static boolean removeMapFrameListener(MapFrameListener listener) {
    1182         return mainPanel.removeMapFrameListener(listener);
     1182        return mainPanel != null && mainPanel.removeMapFrameListener(listener);
    11831183    }
    11841184
Note: See TracChangeset for help on using the changeset viewer.