Another null pointer fixed, internet resources can be unavailable.

This commit is contained in:
Pavol Zibrita 2011-07-25 21:24:13 +02:00
parent 85e39679c2
commit 1016b155dc

View file

@ -594,16 +594,18 @@ public class OsmandSettings {
}
private TileSourceTemplate checkAmongAvailableTileSources(File dir, List<TileSourceTemplate> list){
for (TileSourceTemplate l : list) {
if (dir.getName().equals(l.getName())) {
try {
dir.mkdirs();
TileSourceManager.createMetaInfoFile(dir, l, true);
} catch (IOException e) {
if (list != null) {
for (TileSourceTemplate l : list) {
if (dir.getName().equals(l.getName())) {
try {
dir.mkdirs();
TileSourceManager.createMetaInfoFile(dir, l, true);
} catch (IOException e) {
}
return l;
}
return l;
}
}
return null;
}