mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Resolved crash when returning to empire overview and a category is missing
This commit is contained in:
parent
62469daff6
commit
626973bfb7
@ -116,7 +116,7 @@ class EmpireOverviewScreen(
|
||||
// This is called by UncivGame.popScreen - e.g. after City Tab opened a City and the user closes that CityScreen...
|
||||
// Notify the current tab via its IPageExtensions.activated entry point so it can refresh if needed
|
||||
val index = tabbedPager.activePage
|
||||
val category = EmpireOverviewCategories.values()[index - 1]
|
||||
val category = EmpireOverviewCategories.values().getOrNull(index - 1) ?: return
|
||||
pageObjects[category]?.activated(index, "", tabbedPager) // Fake caption marks this as popScreen-triggered
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user