Fix possible npe

This commit is contained in:
Vitaliy 2021-02-11 13:12:40 +02:00
parent 8044f306e2
commit 33a2cf6ba3

View file

@ -1369,7 +1369,9 @@ public class MenuBuilder {
if (amenity != null) {
PoiCategory category = amenity.getType();
PoiType poiType = category.getPoiTypeByKeyName(amenity.getSubType());
return app.getPoiFilters().getFilterById(PoiUIFilter.STD_PREFIX + poiType.getKeyName());
if (poiType != null) {
return app.getPoiFilters().getFilterById(PoiUIFilter.STD_PREFIX + poiType.getKeyName());
}
}
return null;
}