diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java index a14e2e306a..747e457914 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java @@ -903,9 +903,8 @@ public class PlanRouteFragment extends BaseOsmAndFragment implements OsmAndLocat List selectedLatLon = markersHelper.getSelectedMarkersLatLon(); LatLon start = startFromLoc ? new LatLon(myLoc.getLatitude(), myLoc.getLongitude()) : selectedLatLon.remove(0); - LatLon end = selectedLatLon.remove(selectedLatLon.size() - 1); - int[] sequence = new TspAnt().readGraph(selectedLatLon, start, end).solve(); + int[] sequence = new TspAnt().readGraph(selectedLatLon, start, null).solve(); List res = new ArrayList<>(); for (int i = 0; i < sequence.length; i++) {