Ignore:
Timestamp:
2013-05-27T12:09:07+02:00 (11 years ago)
Author:
larry0ua
Message:

PicLayer - #8743 - fixed NPE when removing last layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java

    r27766 r29601  
    169169                new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null);
    170170        }
    171         boolean enable = Main.map.mapView.getAllLayers().size() != 0;
     171        // Why should I do all these checks now?
     172        boolean enable = Main.map != null && Main.map.mapView != null && Main.map.mapView.getAllLayers() != null && Main.map.mapView.getAllLayers().size() != 0;
    172173        menu.setEnabled(enable);
    173174    }
Note: See TracChangeset for help on using the changeset viewer.