Skip to content

Commit

Permalink
Fix crash in (not yet used?) Villa code (#11295)
Browse files Browse the repository at this point in the history
  • Loading branch information
KungCheops authored Oct 2, 2024
1 parent 9e39f44 commit 5d79779
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3603,6 +3603,12 @@ int CvBuilderTaskingAI::GetResourceSpawnWorkableChance(CvPlot* pPlot, int& iTile
aPossibleSpawnPlots.push_back(pAdjacentPlot);
}

if (aPossibleSpawnPlots.empty())
{
iTileClaimChance = 0;
return 0;
}

int iWorkableSpawnPlots = 0;
int iNonWorkableSpawnPlots = 0;
int iClaimTiles = 0;
Expand Down

0 comments on commit 5d79779

Please sign in to comment.