Ignore:
Timestamp:
2009-10-28T20:14:07+01:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3792: NPE when deleting the data layer while the deletion tool is active

File:
1 edited

Legend:

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

    r2323 r2343  
    3333
    3434    protected GpxLayer getLayer() {
    35         if (Main.map == null) return null;
    36         if (Main.map.mapView == null) return null;
     35        if (!Main.isDisplayingMapView()) return null;
    3736        if (Main.map.mapView.getActiveLayer() == null) return null;
    3837        Layer layer = Main.map.mapView.getActiveLayer();
     
    9594    @Override
    9695    protected void updateEnabledState() {
    97         boolean check = Main.main != null
    98         && Main.map != null
    99         && Main.map.mapView !=null
     96        boolean check =           
     97        Main.isDisplayingMapView()
    10098        && Main.map.mapView.getActiveLayer() != null;
    10199        if(!check) {
Note: See TracChangeset for help on using the changeset viewer.