Ignore:
Timestamp:
2012-03-17T22:24:18+01:00 (13 years ago)
Author:
simon04
Message:

fix #7517 - NPE when pasting relation with incomplete node members to new layer

File:
1 edited

Legend:

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

    r5052 r5096  
    5252            if (data instanceof NodeData) {
    5353                NodeData n = (NodeData)data;
    54                 double east = n.getEastNorth().east();
    55                 double north = n.getEastNorth().north();
    56                 if (east > maxEast) { maxEast = east; }
    57                 if (east < minEast) { minEast = east; }
    58                 if (north > maxNorth) { maxNorth = north; }
    59                 if (north < minNorth) { minNorth = north; }
     54                if (n.getEastNorth() != null) {
     55                    double east = n.getEastNorth().east();
     56                    double north = n.getEastNorth().north();
     57                    if (east > maxEast) { maxEast = east; }
     58                    if (east < minEast) { minEast = east; }
     59                    if (north > maxNorth) { maxNorth = north; }
     60                    if (north < minNorth) { minNorth = north; }
     61                }
    6062            }
    6163            if (data.isIncomplete()) {
Note: See TracChangeset for help on using the changeset viewer.