Another null pointer fixed, internet resources can be unavailable.
This commit is contained in:
parent
85e39679c2
commit
1016b155dc
1 changed files with 10 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue