Merge pull request #14 from jmakovicka/start-without-tiles-exception
fix NullPointerException at startup without the tiles directory
This commit is contained in:
commit
458e07c645
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