fix NullPointerException at startup without the tiles directory
This commit is contained in:
parent
49ed089370
commit
985fcdc48e
1 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,9 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback {
|
|||
for(TileSourceTemplate t : list){
|
||||
map.put(t.getName(), t);
|
||||
}
|
||||
if (!dir.isDirectory()) {
|
||||
return map;
|
||||
}
|
||||
for(File f : dir.listFiles()){
|
||||
if(f.isDirectory()){
|
||||
if(map.containsKey(f.getName())){
|
||||
|
|
Loading…
Reference in a new issue