From e5d8de6b585effe9883aa81fd2141464f1a51e7c Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 7 Jun 2022 23:31:22 +0300 Subject: [PATCH] Resolved crashes when centering on a city-state with no cities --- core/src/com/unciv/ui/trade/DiplomacyScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index b4ddacecb7..96bb2da659 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -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()