From 7d0916bce6eb3f4b0e73fc090626b54acfc1cb32 Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 19 Nov 2014 14:58:16 +0200 Subject: [PATCH] Fixed bug with same item can be added to avoid roads twice --- OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java index 7b7d4ca14d..4098427f07 100644 --- a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java +++ b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java @@ -114,8 +114,10 @@ public class RoutingConfiguration { } public void addImpassableRoad(RouteDataObject r) { - impassableRoadIds.add(r.id); - impassableRoads.add(r); + if (!impassableRoadIds.contains(r.id)){ + impassableRoadIds.add(r.id); + impassableRoads.add(r); + } }