Skip to content

Commit

Permalink
restore mapfile/mapgenerator only if non empty (fix #201)
Browse files Browse the repository at this point in the history
  • Loading branch information
moving-bits authored and Lineflyer committed Aug 20, 2020
1 parent a8dba4c commit 9ca08e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ private void refreshItems() {
FileOpenResult result = mapView.setMapFile(new File(newMapfile));
if (result == FileOpenResult.SUCCESS) {
setMapGenerator(MapGeneratorInternal.DATABASE_RENDERER);
} else {
} else if (null != backupMapFile && null != backupMapGenerator) {
// restore the backuped data
mapView.setMapFile(backupMapFile);
mapView.setMapGenerator(backupMapGenerator);
Expand Down

0 comments on commit 9ca08e7

Please sign in to comment.