Skip to content

Commit

Permalink
Fix #9772
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Sep 14, 2023
1 parent a8785cb commit 1ca84f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54925,8 +54925,11 @@ int CvDiplomacyAIHelpers::GetCityLiberationValue(CvCity* pCity, PlayerTypes eLib

if (!bHisGainIsOurOwn)
{
// Need to check if the opponent is alive, calling this for an unmet player can crash the game
StrengthTypes eOpponentStrength = GET_PLAYER(eNewOwner).isAlive() ? pDiplo->GetMilitaryStrengthComparedToUs(eNewOwner) : STRENGTH_PATHETIC;

// DECREASE if opponent is big and nasty.
switch (pDiplo->GetMilitaryStrengthComparedToUs(eNewOwner))
switch (eOpponentStrength)
{
case NO_STRENGTH_VALUE:
UNREACHABLE(); // Strengths are supposed to have been evaluated by this point.
Expand Down

0 comments on commit 1ca84f3

Please sign in to comment.