Changeset 13586 in josm


Ignore:
Timestamp:
2018-03-30T19:33:33+02:00 (4 months ago)
Author:
Don-vip
Message:

fix #16141, see #8039, see #10456: fix NPE in preset editor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java

    r13453 r13586  
    1212import javax.swing.JPanel;
    1313
     14import org.openstreetmap.josm.data.osm.DataSet;
    1415import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1516import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset;
     
    4041                return;
    4142            int answer = t.showDialog(selection, false);
     43            DataSet ds = selection.iterator().next().getDataSet();
     44            boolean locked = ds != null && ds.isLocked();
    4245
    43             if (answer == TaggingPreset.DIALOG_ANSWER_APPLY && !selection.iterator().next().getDataSet().isLocked()) {
     46            if (answer == TaggingPreset.DIALOG_ANSWER_APPLY && !locked) {
    4447                presetHandler.updateTags(t.getChangedTags());
    4548            }
Note: See TracChangeset for help on using the changeset viewer.