diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 3c8105de92..93232f3aae 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -220,7 +220,7 @@ public class ConfigureMapMenu { selected = settings.SELECTED_POI_FILTER_FOR_MAP.get() != null; adapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(R.string.layer_poi, activity) - .setSelected(settings.SELECTED_POI_FILTER_FOR_MAP.get() != null) + .setSelected(selected) .setDescription(POIMapLayer.getSelectedPoiName(app)) .setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID) .setIcon(R.drawable.ic_action_info_dark) diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 47ea75b2a0..4015ce555c 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -322,7 +322,11 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon return app.getResources().getString(R.string.shared_string_none); } PoiUIFilter filter = pfh.getFilterById(filterId); - return filter.getName(); + if (filter == null) { + return app.getResources().getString(R.string.shared_string_none); + } else { + return filter.getName(); + } } static int getResIdFromAttribute(final Context ctx, final int attr) {