Changeset 368 in josm


Ignore:
Timestamp:
2007-10-12T01:37:40+02:00 (17 years ago)
Author:
framm
Message:
  • fix NPE when delete-clicking on empty map area
File:
1 edited

Legend:

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

    r358 r368  
    102102               
    103103                OsmPrimitive sel = Main.map.mapView.getNearestNode(e.getPoint());
    104                 Command c;
     104                Command c = null;
    105105                if (sel == null) {
    106106                        WaySegment ws = Main.map.mapView.getNearestWaySegment(e.getPoint());
    107                         c = deleteWaySegment(ws);
     107                        if (ws != null) c = deleteWaySegment(ws);
    108108                } else if (ctrl) {
    109109                        c = deleteWithReferences(Collections.singleton(sel));
Note: See TracChangeset for help on using the changeset viewer.