Fix bug with NPE of osmand regions

This commit is contained in:
vshcherb 2013-10-27 00:37:32 +02:00
parent c6e8e1c5c9
commit f6692765f2

View file

@ -23,7 +23,6 @@ public class OsmandRegions {
Integer downloadNameType = null; Integer downloadNameType = null;
Integer prefixType = null; Integer prefixType = null;
private Integer suffixType; private Integer suffixType;
private String fname;
public void prepareFile(String fileName) throws IOException { public void prepareFile(String fileName) throws IOException {
@ -136,7 +135,9 @@ public class OsmandRegions {
} }
} }
); );
reader.searchMapIndex(sr); if(reader != null) {
reader.searchMapIndex(sr);
}
return result; return result;
} }
@ -167,7 +168,9 @@ public class OsmandRegions {
} }
} }
); );
reader.searchMapIndex(sr); if(reader != null) {
reader.searchMapIndex(sr);
}
return result; return result;
} }
@ -227,7 +230,9 @@ public class OsmandRegions {
} }
} }
); );
reader.searchMapIndex(sr); if(reader != null) {
reader.searchMapIndex(sr);
}
} }
private void initTypes(BinaryMapDataObject object) { private void initTypes(BinaryMapDataObject object) {