Changeset 5907 in josm


Ignore:
Timestamp:
2013-04-28T23:59:22+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #8642 - Fix NPE when deleting osm data layer with active validator layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java

    r5897 r5907  
    156156    @Override
    157157    public void layerRemoved(Layer oldLayer) {
    158         if (oldLayer instanceof OsmDataLayer && Main.map.mapView.getEditLayer() == null) {
     158        if (oldLayer instanceof OsmDataLayer && Main.map != null && Main.map.mapView.getEditLayer() == null) {
    159159            Main.main.removeLayer(this);
    160160        } else if (oldLayer == this) {
Note: See TracChangeset for help on using the changeset viewer.