Ignore:
Timestamp:
2013-10-27T03:20:19+01:00 (7 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/command/Command.java

    r6173 r6333  
    8686     */
    8787    public Command() {
    88         this.layer = Main.map != null && Main.map.mapView != null ? Main.map.mapView.getEditLayer() : null;
     88        this.layer = Main.isDisplayingMapView() ? Main.map.mapView.getEditLayer() : null;
    8989    }
    9090
Note: See TracChangeset for help on using the changeset viewer.