From 741f954077ae8e17f88ca39601ccadf6d773d6bc Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 25 Nov 2015 13:13:45 +0300 Subject: [PATCH] Fixed crash at OsmEditingPlugin (12) --- 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 a8c210b725..07a9814db5 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -213,7 +213,7 @@ public class OsmEditingPlugin extends OsmandPlugin { if (selectedObj instanceof Amenity) { Amenity amenity = (Amenity) selectedObj; final PoiType poiType = amenity.getType().getPoiTypeByKeyName(amenity.getSubType()); - isEditable = !amenity.getType().isWiki() && !poiType.isNotEditableOsm(); + isEditable = poiType != null && !amenity.getType().isWiki() && !poiType.isNotEditableOsm(); } if (isEditable) { adapter.item(R.string.poi_context_menu_modify).iconColor(R.drawable.ic_action_edit_dark).listen(listener).position(1).reg();