From 2bcf634962a3e7418c04cd1aa881a937d04ab1b3 Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Mon, 24 Jul 2017 12:37:02 +0300 Subject: [PATCH] Fix logic --- OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java index 6f178a3b80..557610bf78 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java @@ -578,8 +578,10 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable private void putAllAcceptedTypes(Map> types) { for (PoiCategory category : types.keySet()) { - if (acceptedTypes.get(category) != null) { - acceptedTypes.get(category).addAll(types.get(category)); + if (acceptedTypes.containsKey(category)) { + if (acceptedTypes.get(category) != null) { + acceptedTypes.get(category).addAll(types.get(category)); + } } else { acceptedTypes.put(category, types.get(category)); }