From 95d1c7370e637af53b7798e2704b46dd56ed585f Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Fri, 2 Feb 2018 12:06:37 +0200 Subject: [PATCH] Fix NPE that occurs when swapping start and finish points --- .../net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java index 00baf41ec6..3165abc6c4 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java @@ -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);