Changeset 18214 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2021-09-12T02:35:22+02:00 (3 years ago)
Author:
Don-vip
Message:

see #17177 - fix potential NPE (coverity 1458165)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/vector/VectorWay.java

    r17867 r18214  
    7474        this.nodes.forEach(node -> node.removeReferrer(this));
    7575        this.nodes.clear();
    76         nodes.forEach(node -> node.addReferrer(this));
    77         this.nodes.addAll(nodes);
     76        if (nodes != null) {
     77            nodes.forEach(node -> node.addReferrer(this));
     78            this.nodes.addAll(nodes);
     79        }
    7880        this.cachedBBox = null;
    7981    }
Note: See TracChangeset for help on using the changeset viewer.