Resolved crashes when centering on a city-state with no cities

This commit is contained in:
Yair Morgenstern 2022-06-07 23:31:22 +03:00
parent 23f55a959c
commit e5d8de6b58

View File

@ -398,7 +398,8 @@ class DiplomacyScreen(
}
}
diplomacyTable.add(getGoToOnMapButton(otherCiv)).row()
if (otherCiv.cities.isNotEmpty() && otherCiv.getCapital() != null && otherCiv.getCapital()!!.location in viewingCiv.exploredTiles)
diplomacyTable.add(getGoToOnMapButton(otherCiv)).row()
val diplomaticMarriageButton = getDiplomaticMarriageButton(otherCiv)
if (diplomaticMarriageButton != null) diplomacyTable.add(diplomaticMarriageButton).row()