Changeset 6994 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2014-04-22T13:05:26+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #7705 - NPE when using piclayer plugin without data layer

File:
1 edited

Legend:

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

    r6986 r6994  
    88import org.openstreetmap.josm.Main;
    99import org.openstreetmap.josm.command.Command;
     10import org.openstreetmap.josm.data.osm.DataSet;
    1011import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1112import org.openstreetmap.josm.gui.MapView;
     
    5556
    5657        // the command may have changed the selection so tell the listeners about the current situation
    57         Main.main.getCurrentDataSet().fireSelectionChanged();
     58        DataSet ds = Main.main.getCurrentDataSet();
     59        if (ds != null) {
     60            ds.fireSelectionChanged();
     61        }
    5862    }
    5963
Note: See TracChangeset for help on using the changeset viewer.