add null check for selectedObj
This commit is contained in:
parent
9de34ecf0c
commit
864f4ef7a9
1 changed files with 4 additions and 2 deletions
|
@ -196,8 +196,10 @@ 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 != null) {
|
||||
EditPoiDialogFragment.showEditInstance(selectedObj instanceof TransportStop ?
|
||||
((TransportStop) selectedObj).getAmenity() : (Amenity) selectedObj, mapActivity);
|
||||
}
|
||||
} else if (resId == R.string.poi_context_menu_modify_osm_change) {
|
||||
final Node entity = ((OpenstreetmapPoint) selectedObj).getEntity();
|
||||
EditPoiDialogFragment.createInstance(entity, false)
|
||||
|
|
Loading…
Reference in a new issue