From 7c9bdb70f124064fefed7f8945b906cd70be1953 Mon Sep 17 00:00:00 2001 From: cepprice Date: Tue, 23 Mar 2021 12:13:00 +0500 Subject: [PATCH] Fix 'Open track' button of newly created Waypoint --- .../plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java index 0e583392ba..88052adf4e 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java @@ -213,6 +213,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew { String description = Algorithms.isEmpty(getDescriptionTextValue()) ? null : getDescriptionTextValue(); if (editor.isNew()) { doAddWpt(name, category, description); + wpt = getWpt(); } else { doUpdateWpt(name, category, description); } @@ -222,7 +223,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew { } MapContextMenu menu = mapActivity.getContextMenu(); - if (menu.getLatLon() != null && menu.isActive()) { + if (menu.getLatLon() != null && menu.isActive() && wpt != null) { LatLon latLon = new LatLon(wpt.getLatitude(), wpt.getLongitude()); if (menu.getLatLon().equals(latLon)) { menu.update(latLon, new WptLocationPoint(wpt).getPointDescription(mapActivity), wpt);