Changeset 15029 in josm for trunk/src


Ignore:
Timestamp:
2019-04-28T03:45:09+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #17645 - robustness to invalid preset icons

File:
1 edited

Legend:

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

    r14449 r15029  
    226226            .getResourceAsync(result -> {
    227227                if (result != null) {
    228                     GuiHelper.runInEDT(() -> result.attachImageIcon(this));
     228                    GuiHelper.runInEDT(() -> {
     229                        try {
     230                            result.attachImageIcon(this);
     231                        } catch (IllegalArgumentException e) {
     232                            Logging.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);
     233                            Logging.warn(e);
     234                        }
     235                    });
    229236                } else {
    230237                    Logging.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);
Note: See TracChangeset for help on using the changeset viewer.