add npe checks
This commit is contained in:
parent
315e1c38a7
commit
5404f626ec
2 changed files with 6 additions and 2 deletions
|
@ -445,7 +445,9 @@ public class TargetPointsHelper {
|
|||
Location lastKnownLocation = ctx.getLocationProvider().getLastKnownLocation();
|
||||
LatLon latLon = lastKnownLocation != null ?
|
||||
new LatLon(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude()) : null;
|
||||
routingHelper.checkAndUpdateStartLocation(latLon);
|
||||
if (latLon != null) {
|
||||
routingHelper.checkAndUpdateStartLocation(latLon);
|
||||
}
|
||||
setMyLocationPoint(latLon, false, null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,7 +174,9 @@ public class RoutingHelper {
|
|||
}
|
||||
|
||||
public synchronized void setFinalAndCurrentLocation(LatLon finalLocation, List<LatLon> intermediatePoints, Location currentLocation){
|
||||
checkAndUpdateStartLocation(currentLocation);
|
||||
if (currentLocation != null) {
|
||||
checkAndUpdateStartLocation(currentLocation);
|
||||
}
|
||||
RouteCalculationResult previousRoute = route;
|
||||
clearCurrentRoute(finalLocation, intermediatePoints);
|
||||
// to update route
|
||||
|
|
Loading…
Reference in a new issue