mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-24 06:39:16 +07:00
Fix crash when base ruleset contains no strategic resources (#7193)
This commit is contained in:
@ -158,9 +158,13 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() {
|
||||
}
|
||||
|
||||
// in case the icons are configured higher than a label, we add a dummy - height will be measured once before it's updated
|
||||
resourcesWrapper.add(resourceActors[0].icon)
|
||||
if (resourceActors.isNotEmpty()) {
|
||||
resourcesWrapper.add(resourceActors[0].icon)
|
||||
resourceTable.add(resourcesWrapper)
|
||||
}
|
||||
|
||||
resourceTable.add(turnsLabel).pad(5f, 5f, 10f, 5f)
|
||||
resourceTable.add(resourcesWrapper)
|
||||
|
||||
return resourceTable
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user