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 815ec5c2fd..7d3efda165 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java @@ -262,7 +262,7 @@ public abstract class MapObject implements Comparable { if (this == thatObj) { return true; } else { - if(this.id == null || thatObj.id == null) { + if(thatObj == null || this.id == null || thatObj.id == null) { return false; } return this.id.longValue() == thatObj.id.longValue() &&