From 4bfbf0ab5e611a3360f3f1fdeea6614c9316edb5 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Thu, 26 Apr 2018 09:32:08 +0300 Subject: [PATCH] Fixed crash due to null region name --- .../net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java index adfc31841b..00ad198b8d 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java @@ -242,7 +242,11 @@ public class WikivoyageWebViewClient extends WebViewClient implements RegionCall break; } if(osmandRegions.contain(b, x31, y31)) { - return osmandRegions.getLocaleName(osmandRegions.getDownloadName(b), false); + String downloadName = osmandRegions.getDownloadName(b); + if (downloadName == null) { + return ""; + } + return osmandRegions.getLocaleName(downloadName, false); } } }