add npe check for poi category

This commit is contained in:
Chumva 2018-05-25 17:20:07 +03:00
parent c62f0ae66c
commit 7e16d30a71

View file

@ -143,7 +143,10 @@ public class AdvancedEditPoiFragment extends BaseOsmAndFragment
amenityTagTextView.setText(pt.getEditOsmTag()); amenityTagTextView.setText(pt.getEditOsmTag());
amenityTextView.setText(pt.getEditOsmValue()); amenityTextView.setText(pt.getEditOsmValue());
} else { } else {
amenityTagTextView.setText(getData().getPoiCategory().getDefaultTag()); PoiCategory category = getData().getPoiCategory();
if (category != null) {
amenityTagTextView.setText(category.getDefaultTag());
}
amenityTextView.setText(getData().getPoiTypeString()); amenityTextView.setText(getData().getPoiTypeString());
} }
} }