From 0dd39caa71c54b46a88cf190a4434b5b75f393a1 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Thu, 22 Oct 2015 22:48:47 +0300 Subject: [PATCH] Fix OsmandRegions --- .../src/net/osmand/map/OsmandRegions.java | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/net/osmand/map/OsmandRegions.java index cb5db953c6..8d6ee064d4 100644 --- a/OsmAnd-java/src/net/osmand/map/OsmandRegions.java +++ b/OsmAnd-java/src/net/osmand/map/OsmandRegions.java @@ -97,19 +97,35 @@ public class OsmandRegions { } private String getLang(BinaryMapDataObject o) { - return o.getNameByType(langType); + if (langType != null) { + return o.getNameByType(langType); + } else { + return null; + } } private String getMetric(BinaryMapDataObject o) { - return o.getNameByType(metricType); + if (metricType != null) { + return o.getNameByType(metricType); + } else { + return null; + } } private String getLeftHandDriving(BinaryMapDataObject o) { - return o.getNameByType(leftHandDrivingType); + if (leftHandDrivingType != null) { + return o.getNameByType(leftHandDrivingType); + } else { + return null; + } } private String getRoadSigns(BinaryMapDataObject o) { - return o.getNameByType(roadSignsType); + if (roadSignsType != null) { + return o.getNameByType(roadSignsType); + } else { + return null; + } } public String getDownloadName(BinaryMapDataObject o) {