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 0769e1390c..4c85058fa3 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java @@ -457,10 +457,10 @@ public class BinaryRoutePlanner { directionAllowed = false; continue; } - boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments, - segmentPoint, segmentDist, obstaclesTime); obstaclesTime += obstacle; obstaclesTime += heightObstacle; + boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments, + segmentPoint, segmentDist, obstaclesTime); if (alreadyVisited) { directionAllowed = false; continue;