Changeset 14674 in josm


Ignore:
Timestamp:
2019-01-11T21:47:35+01:00 (2 months ago)
Author:
Don-vip
Message:

fix #17181 - IAE at OsmIdSelectionDialog.setupDialog

File:
1 edited

Legend:

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

    r12846 r14674  
    3838import org.openstreetmap.josm.gui.widgets.OsmPrimitiveTypesComboBox;
    3939import org.openstreetmap.josm.spi.preferences.Config;
     40import org.openstreetmap.josm.tools.Logging;
    4041import org.openstreetmap.josm.tools.Utils;
    4142
     
    208209    public void setupDialog() {
    209210        setContent(panel, false);
    210         cbType.setSelectedIndex(Config.getPref().getInt("downloadprimitive.lasttype", 0));
     211        try {
     212            cbType.setSelectedIndex(Config.getPref().getInt("downloadprimitive.lasttype", 0));
     213        } catch (IllegalArgumentException e) {
     214            cbType.setSelectedIndex(0);
     215            Logging.warn(e);
     216        }
    211217        tfId.setType(cbType.getType());
    212218        if (Config.getPref().getBoolean("downloadprimitive.autopaste", true)) {
Note: See TracChangeset for help on using the changeset viewer.