Fix possible npe
This commit is contained in:
parent
8044f306e2
commit
33a2cf6ba3
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue