Changeset 2312 in josm for trunk/src


Ignore:
Timestamp:
2009-10-25T13:03:34+01:00 (13 years ago)
Author:
Gubaer
Message:

fixed #3759: NPE on copy-paste between two layers where the origin layer has been deleted
Only happened if you pasted in a new layer the mouse never entered

File:
1 edited

Legend:

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

    r2305 r2312  
    5858            mPosition = Main.map.mapView.getCenter();
    5959        } else {
    60             mPosition = Main.map.mapView.getEastNorth(Main.map.mapView.lastMEvent.getX(), Main.map.mapView.lastMEvent.getY());
     60            if (Main.map.mapView.lastMEvent != null) {
     61                mPosition = Main.map.mapView.getEastNorth(Main.map.mapView.lastMEvent.getX(), Main.map.mapView.lastMEvent.getY());
     62            } else {
     63                mPosition = Main.map.mapView.getCenter();
     64            }
    6165        }
    6266
Note: See TracChangeset for help on using the changeset viewer.