Merge pull request #4220 from osmandapp/npe_send_poi_dialog

Fix NPE in send poi
This commit is contained in:
Alexey 2017-07-28 12:17:18 +03:00 committed by GitHub
commit 7dd7087698

View file

@ -149,6 +149,9 @@ public class SendPoiDialogFragment extends DialogFragment {
if (p.getGroup() == OsmPoint.Group.POI) {
OsmPoint.Action action = p.getAction();
String type = ((OpenstreetmapPoint) p).getEntity().getTag(EditPoiData.POI_TYPE_TAG);
if (type == null) {
continue;
}
PoiType localizedPoiType = allTranslatedSubTypes.get(type.toLowerCase().trim());
if (localizedPoiType != null) {
type = Algorithms.capitalizeFirstLetter(localizedPoiType.getKeyName().replace('_', ' '));