Fixed crash due to null region name

This commit is contained in:
PaulStets 2018-04-26 09:32:08 +03:00
parent d859aa170a
commit 4bfbf0ab5e

View file

@ -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);
}
}
}