Changeset 35174 in osm for applications


Ignore:
Timestamp:
2019-10-05T17:00:10+02:00 (5 years ago)
Author:
donvip
Message:

fix #josm13771 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectBoundaryAction.java

    r35098 r35174  
    2121import org.openstreetmap.josm.data.osm.Way;
    2222import org.openstreetmap.josm.gui.MainApplication;
     23import org.openstreetmap.josm.gui.MapView;
    2324import org.openstreetmap.josm.gui.Notification;
    2425import org.openstreetmap.josm.tools.Shortcut;
     
    5758                        }
    5859                    }
    59                 } else {
    60                     Point p = MainApplication.getMap().mapView.getMousePosition();
     60                } else if (MainApplication.isDisplayingMapView()) {
     61                    MapView mapView = MainApplication.getMap().mapView;
     62                    Point p = mapView.getMousePosition();
    6163                    if (p != null) {
    62                         SelectByInternalPointAction.performSelection(MainApplication.getMap().mapView.getEastNorth(p.x, p.y), false, false);
     64                        SelectByInternalPointAction.performSelection(mapView.getEastNorth(p.x, p.y), false, false);
    6365                    }
    6466                    return;
Note: See TracChangeset for help on using the changeset viewer.