From 17708d6932cf1c5c14eb2636e3fcf037b63d0421 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 5 Mar 2020 00:18:25 +0100 Subject: [PATCH] Fix rendering_exception leading to "Could not draw chosen area" Exception was caused by additionalTypes being null. Occured when zooming out. --- .../src/main/java/net/osmand/binary/BinaryMapDataObject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java index 4a3c465699..8966256ea5 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java @@ -109,7 +109,7 @@ public class BinaryMapDataObject { } public boolean containsAdditionalType(int cachedType) { - if (cachedType != -1) { + if (cachedType != -1 && additionalTypes != null) { for (int i = 0; i < additionalTypes.length; i++) { if (additionalTypes[i] == cachedType) { return true;