Fix NPE that occurs when swapping start and finish points

This commit is contained in:
Alexander Sytnyk 2018-02-02 12:06:37 +02:00
parent 1a500a352e
commit cbfb50c1dd

View file

@ -306,7 +306,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
}
}
if (startPoint != null) {
if (startPoint != null && endPoint != null) {
targetPointsHelper.navigateToPoint(startPoint.point, false, -1, startPoint.getPointDescription(mapActivity));
targetPointsHelper.setStartPoint(endPoint.point, false, endPoint.getPointDescription(mapActivity));
targetPointsHelper.updateRouteAndRefresh(true);