Fix NPE
This commit is contained in:
parent
2624ecaef0
commit
2e4163cf7c
1 changed files with 3 additions and 0 deletions
|
@ -149,6 +149,9 @@ public class SendPoiDialogFragment extends DialogFragment {
|
||||||
if (p.getGroup() == OsmPoint.Group.POI) {
|
if (p.getGroup() == OsmPoint.Group.POI) {
|
||||||
OsmPoint.Action action = p.getAction();
|
OsmPoint.Action action = p.getAction();
|
||||||
String type = ((OpenstreetmapPoint) p).getEntity().getTag(EditPoiData.POI_TYPE_TAG);
|
String type = ((OpenstreetmapPoint) p).getEntity().getTag(EditPoiData.POI_TYPE_TAG);
|
||||||
|
if (type == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
PoiType localizedPoiType = allTranslatedSubTypes.get(type.toLowerCase().trim());
|
PoiType localizedPoiType = allTranslatedSubTypes.get(type.toLowerCase().trim());
|
||||||
if (localizedPoiType != null) {
|
if (localizedPoiType != null) {
|
||||||
type = Algorithms.capitalizeFirstLetter(localizedPoiType.getKeyName().replace('_', ' '));
|
type = Algorithms.capitalizeFirstLetter(localizedPoiType.getKeyName().replace('_', ' '));
|
||||||
|
|
Loading…
Reference in a new issue