From 19464a2a440d2788a0f063bef4f83ed7d3ba7047 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 23 Oct 2018 12:46:06 +0300 Subject: [PATCH] Fix possible npe --- OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 0e8a29a903..cfc08ab1be 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -198,7 +198,7 @@ public class OsmEditingPlugin extends OsmandPlugin { } else if (resId == R.string.context_menu_item_modify_note) { modifyOsmNote(mapActivity, (OsmNotesPoint) selectedObj); } else if (resId == R.string.poi_context_menu_modify) { - if (selectedObj instanceof TransportStop) { + if (selectedObj instanceof TransportStop && ((TransportStop) selectedObj).getAmenity() != null) { EditPoiDialogFragment.showEditInstance(((TransportStop) selectedObj).getAmenity(), mapActivity); } else if (selectedObj instanceof MapObject) { EditPoiDialogFragment.showEditInstance((MapObject) selectedObj, mapActivity);