Changeset 34093 in osm for applications


Ignore:
Timestamp:
2018-03-21T01:49:16+01:00 (7 years ago)
Author:
floscher
Message:

Fix #15623 – Check if editDataSet is present before adding wikipedia tag to selected object(s)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/gui/WikipediaToggleDialog.java

    r34079 r34093  
    2727import org.openstreetmap.josm.command.ChangePropertyCommand;
    2828import org.openstreetmap.josm.data.coor.LatLon;
     29import org.openstreetmap.josm.data.osm.DataSet;
    2930import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3031import org.openstreetmap.josm.data.osm.Tag;
     
    316317
    317318        static void addTag(Tag tag) {
    318             if (tag == null) {
    319                 return;
    320             }
    321             final Collection<OsmPrimitive> selected = MainApplication.getLayerManager().getEditDataSet().getSelected();
     319            final DataSet editDataSet = MainApplication.getLayerManager().getEditDataSet();
     320            if (tag == null || editDataSet == null) {
     321                return;
     322            }
     323            final Collection<OsmPrimitive> selected = editDataSet.getSelected();
    322324            if (selected.isEmpty() || !GuiUtils.confirmOverwrite(tag.getKey(), tag.getValue(), selected)) {
    323325                return;
Note: See TracChangeset for help on using the changeset viewer.