diff --git a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java index 3a04b10fda..815ec5c2fd 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java @@ -262,6 +262,9 @@ public abstract class MapObject implements Comparable { if (this == thatObj) { return true; } else { + if(this.id == null || thatObj.id == null) { + return false; + } return this.id.longValue() == thatObj.id.longValue() && Algorithms.objectEquals(getLocation(), thatObj.getLocation()) && Algorithms.objectEquals(this.getName(), thatObj.getName()) &&