mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 15:30:43 -04:00
fixed crash (#3077)
This commit is contained in:
parent
6d190d1097
commit
0335b3ba46
@ -146,8 +146,10 @@ class MapOptionsTable(val newGameScreen: NewGameScreen): Table() {
|
||||
mapFileSelectBox.items = mapFiles
|
||||
val selectedItem = mapFiles.firstOrNull { it.fileHandle.name()==mapParameters.name }
|
||||
if (selectedItem != null) mapFileSelectBox.selected = selectedItem
|
||||
else mapFileSelectBox.selected = mapFiles.first()
|
||||
newGameScreen.gameSetupInfo.mapFile = mapFileSelectBox.selected.fileHandle
|
||||
else if (!mapFiles.isEmpty) {
|
||||
mapFileSelectBox.selected = mapFiles.first()
|
||||
newGameScreen.gameSetupInfo.mapFile = mapFileSelectBox.selected.fileHandle
|
||||
}
|
||||
|
||||
mapFileSelectBox.onChange {
|
||||
val mapFile = mapFileSelectBox.selected.fileHandle
|
||||
|
Loading…
x
Reference in New Issue
Block a user