mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 15:29:32 +07:00
Resolved #8762 - Civilopedia does not crash when displaying techs on fresh start
This commit is contained in:
@ -11,8 +11,8 @@ import com.unciv.models.ruleset.unique.UniqueTarget
|
||||
import com.unciv.models.ruleset.unique.UniqueType
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.screens.civilopediascreen.FormattedLine
|
||||
import com.unciv.ui.components.Fonts
|
||||
import com.unciv.ui.screens.civilopediascreen.FormattedLine
|
||||
|
||||
class Technology: RulesetObject() {
|
||||
|
||||
@ -224,7 +224,7 @@ class Technology: RulesetObject() {
|
||||
}
|
||||
}
|
||||
|
||||
val viewingCiv = GUI.getViewingPlayer()
|
||||
val viewingCiv = if (GUI.isWorldLoaded()) GUI.getViewingPlayer() else null
|
||||
val enabledUnits = getEnabledUnits(ruleset, viewingCiv)
|
||||
if (enabledUnits.any()) {
|
||||
lineList += FormattedLine()
|
||||
|
Reference in New Issue
Block a user