Changeset 36447 in osm for applications/editors


Ignore:
Timestamp:
2025-05-21T14:17:11+02:00 (7 months ago)
Author:
GerdP
Message:

fix #24296: NPE with Revert of reverted changeset

  • add null check
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java

    r36320 r36447  
    381381        // Handle case where a deleted note has been restored to avoid false conflicts (fix #josm8660)
    382382        if (currentCoor != null && historyCoor == null) {
    383             LatLon previousCoor = ((Node) nds.getPrimitiveById(history.getPrimitiveId())).getCoor();
    384             return previousCoor != null && previousCoor.equals(currentCoor);
     383                if (nds.getPrimitiveById(history.getPrimitiveId()) != null) {
     384                        LatLon previousCoor = ((Node) nds.getPrimitiveById(history.getPrimitiveId())).getCoor();
     385                        return previousCoor != null && previousCoor.equals(currentCoor);
     386                }
    385387        }
    386388        return false;
Note: See TracChangeset for help on using the changeset viewer.