Changeset 10280 in josm


Ignore:
Timestamp:
2016-05-25T08:58:13+02:00 (9 years ago)
Author:
Don-vip
Message:

fix #12874 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r10205 r10280  
    159159    public void setRecentRelation(Relation relation) {
    160160        recentRelations.put(relation, null);
    161         Main.map.relationListDialog.enableRecentRelations();
     161        if (Main.map != null && Main.map.relationListDialog != null) {
     162            Main.map.relationListDialog.enableRecentRelations();
     163        }
    162164    }
    163165
     
    169171    public void removeRecentRelation(Relation relation) {
    170172        recentRelations.remove(relation);
    171         Main.map.relationListDialog.enableRecentRelations();
     173        if (Main.map != null && Main.map.relationListDialog != null) {
     174            Main.map.relationListDialog.enableRecentRelations();
     175        }
    172176    }
    173177
Note: See TracChangeset for help on using the changeset viewer.