Changeset 12235 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-05-22T21:59:38+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #14605 - catch IllegalStateException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r11809 r12235  
    224224            return null;
    225225        }
    226         List<Layer> layers = LayerListDialog.getInstance().getModel().getSelectedLayers();
    227         if (layers.isEmpty())
    228             return null;
    229         return layers.get(0);
     226        try {
     227            List<Layer> layers = LayerListDialog.getInstance().getModel().getSelectedLayers();
     228            if (!layers.isEmpty())
     229                return layers.get(0);
     230        } catch (IllegalStateException e) {
     231            Main.error(e);
     232        }
     233        return null;
    230234    }
    231235
Note: See TracChangeset for help on using the changeset viewer.