From baa1f0db7ea07e5afb318bc7543811370cbd0e90 Mon Sep 17 00:00:00 2001 From: ivanPyrohivskyi Date: Wed, 8 Jan 2025 12:19:39 +0200 Subject: [PATCH] Fix Missing maps calculator --- .../src/main/java/net/osmand/router/MissingMapsCalculator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/MissingMapsCalculator.java b/OsmAnd-java/src/main/java/net/osmand/router/MissingMapsCalculator.java index 9e213e6538c..30f704b1218 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/MissingMapsCalculator.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/MissingMapsCalculator.java @@ -24,7 +24,6 @@ import net.osmand.map.WorldRegion; import net.osmand.util.Algorithms; import net.osmand.util.CollectionUtils; -import net.osmand.util.MapAlgorithms; import net.osmand.util.MapUtils; public class MissingMapsCalculator { @@ -274,7 +273,7 @@ public void close() throws IOException { private boolean isRoadOnlyMap(String regionName) { BinaryMapDataObject o = cachedCountries.get(regionName); - if (o != null) { + if (o != null && or != null) { boolean hasMapType = or.isDownloadOfType(o, OsmandRegions.MAP_TYPE); boolean hasRoadsType = or.isDownloadOfType(o, OsmandRegions.ROADS_TYPE); boolean hasMapJoinType = or.isDownloadOfType(o, OsmandRegions.MAP_JOIN_TYPE);