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 4c85058fa3..0769e1390c 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; } - obstaclesTime += obstacle; - obstaclesTime += heightObstacle; boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments, segmentPoint, segmentDist, obstaclesTime); + obstaclesTime += obstacle; + obstaclesTime += heightObstacle; if (alreadyVisited) { directionAllowed = false; continue;