diff --git a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java index dabefe81b3..0769e1390c 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java @@ -658,7 +658,7 @@ public class BinaryRoutePlanner { break; } } - if (rv == viaId && rt == MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON) { + if (rv == viaId && via && rt == MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON) { type = MapRenderingTypes.RESTRICTION_NO_STRAIGHT_ON; break; } @@ -675,7 +675,7 @@ public class BinaryRoutePlanner { } } - if (rv == viaId && rt == MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON) { + if (rv == viaId && via && rt == MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON) { type = MapRenderingTypes.RESTRICTION_NO_STRAIGHT_ON; break; }