Merge pull request #5285 from osmandapp/PaulsBranch

Fixed crash due to null region name
This commit is contained in:
vshcherb 2018-04-26 09:43:25 +02:00 committed by GitHub
commit c503a4e56a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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