From 21b39fe447a01eb2c07182cb8be7492276a85a91 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 5 Mar 2019 23:51:33 +0100 Subject: [PATCH] Fix NPE OsmAnd Live Public transport --- OsmAnd-java/src/main/java/net/osmand/data/MapObject.java | 3 +++ 1 file changed, 3 insertions(+) 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()) &&