From 08dc488850d5c9b296b88e68f62f36c87d19ddf4 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Fri, 5 Dec 2014 23:00:12 -0500 Subject: [PATCH] Fix NullPointerException that occurs if there are no more turns with lanes indicated. --- OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index 6fcefc641b..316200a4d5 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -409,6 +409,10 @@ public class RouteResultPreparation { } } + if (nextSegment == null) { + continue; + } + TurnType currentTurn = currentSegment.getTurnType(); TurnType nextTurn = nextSegment.getTurnType();