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