Fixed crash at OsmEditingPlugin (12)

This commit is contained in:
Alexey Kulish 2015-11-25 13:13:45 +03:00
parent 57319bce46
commit 741f954077

View file

@ -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();