Changeset 13490 in josm


Ignore:
Timestamp:
2018-03-04T00:15:19+01:00 (8 months ago)
Author:
Don-vip
Message:

fix #16045, see #8039, see #10456 - fix NPE when clicking preset link from relation editor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java

    r13453 r13490  
    492492            }
    493493
     494            boolean disableApply = false;
     495            if (!sel.isEmpty()) {
     496                DataSet ds = sel.iterator().next().getDataSet();
     497                if (ds != null) {
     498                    disableApply = ds.isLocked();
     499                }
     500            }
    494501            answer = new PresetDialog(p, title, preset_name_label ? null : (ImageIcon) getValue(Action.SMALL_ICON),
    495                     sel.isEmpty() || sel.iterator().next().getDataSet().isLocked(), showNewRelation).getValue();
     502                    disableApply, showNewRelation).getValue();
    496503        }
    497504        if (!showNewRelation && answer == 2)
Note: See TracChangeset for help on using the changeset viewer.