diff --git a/src/main/java/de/blau/android/propertyeditor/PropertyEditorFragment.java b/src/main/java/de/blau/android/propertyeditor/PropertyEditorFragment.java index 8382b476d7..c400271507 100644 --- a/src/main/java/de/blau/android/propertyeditor/PropertyEditorFragment.java +++ b/src/main/java/de/blau/android/propertyeditor/PropertyEditorFragment.java @@ -428,7 +428,8 @@ public void onHiddenChanged(boolean hidden) { private boolean elementDeleted() { StorageDelegator d = App.getDelegator(); for (PropertyEditorData p : loadData) { - if (OsmElement.STATE_DELETED == d.getOsmElement(p.type, p.osmId).getState()) { + final OsmElement e = d.getOsmElement(p.type, p.osmId); + if (e == null || OsmElement.STATE_DELETED == e.getState()) { return true; } }