From 103adf8a90ccce7f2e651b8212adcbfe9c1dd258 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Mon, 3 Oct 2016 11:36:31 +0300 Subject: [PATCH] Fix NPE --- OsmAnd/res/values/phrases.xml | 2 +- OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml index c32f5d8747..7c9acc47f1 100644 --- a/OsmAnd/res/values/phrases.xml +++ b/OsmAnd/res/values/phrases.xml @@ -213,7 +213,7 @@ LPG Octane 80 Octane 91 - Octane 92 + Octane %%92 Octane 95 Octane 98 Octane 100 diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java index f0316c47b9..7ad224d687 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java @@ -340,7 +340,10 @@ public class PoiFiltersHelper { public void loadSelectedPoiFilters() { Set filters = application.getSettings().getSelectedPoiFilters(); for (String f : filters) { - selectedPoiFilters.add(getFilterById(f)); + PoiUIFilter filter = getFilterById(f); + if (filter != null) { + selectedPoiFilters.add(filter); + } } }