From 57bea7dbc905cb6e2196fc35fcced495cc0126ac Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 30 Jul 2019 00:11:32 +0200 Subject: [PATCH] Fix NPE --- OsmAnd-java/src/main/java/net/osmand/data/TransportStop.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/data/TransportStop.java b/OsmAnd-java/src/main/java/net/osmand/data/TransportStop.java index f299fc3e8d..ad994a5a82 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/TransportStop.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/TransportStop.java @@ -194,9 +194,12 @@ public class TransportStop extends MapObject { ((this.exits == null && thatObj.exits == null) || (this.exits != null && thatObj.exits != null && this.exits.size() == thatObj.exits.size()))) { if (this.exits != null) { for (TransportStopExit exit1 : this.exits) { + if(exit1 == null) { + return false; + } boolean contains = false; for (TransportStopExit exit2 : thatObj.exits) { - if (exit1.getId().equals(exit2.getId())) { + if (Algorithms.objectEquals(exit1, exit2) ) { contains = true; if (!exit1.compareExit(exit2)) { return false;