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 19e2e90276
commit 95d1c7370e

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);