From 3dff5cd7bb29e461f6da353e55cc58fc2f2348f1 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 6 Mar 2019 01:47:07 +0100 Subject: [PATCH] Fix NPE --- OsmAnd-java/src/main/java/net/osmand/data/MapObject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() &&