Fix #8857
This commit is contained in:
parent
69bdb9926a
commit
88bb70ad24
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue