This commit is contained in:
max-klaus 2020-05-04 16:31:06 +03:00
parent 69bdb9926a
commit 88bb70ad24

View file

@ -1205,9 +1205,11 @@ public class RouteCalculationResult {
int dist = listDistance[rp];
Location l = locations.get(rp);
if(ap != null){
dist += fromLoc.distanceTo(ap);
if (fromLoc != null) {
dist += fromLoc.distanceTo(ap);
}
dist += ap.distanceTo(l);
} else {
} else if (fromLoc != null) {
dist += fromLoc.distanceTo(l);
}
return dist;