Ignore:
Timestamp:
2013-10-27T03:20:19+01:00 (11 years ago)
Author:
Don-vip
Message:

fix #9189 - NPE when deleting data layer + additional usage of Main.isDisplayingMapView()

File:
1 edited

Legend:

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

    r6289 r6333  
    261261            setEnabled(getCurrentDataSet() != null && ! getCurrentDataSet().getSelected().isEmpty());
    262262        }  else if ("layer".equals(mode)) {
    263             if (Main.map == null || Main.map.mapView == null || Main.map.mapView.getAllLayersAsList().isEmpty()) {
     263            if (!Main.isDisplayingMapView() || Main.map.mapView.getAllLayersAsList().isEmpty()) {
    264264                setEnabled(false);
    265265            } else {
Note: See TracChangeset for help on using the changeset viewer.