diff --git a/Project Files/DLLSources/CvCity.cpp b/Project Files/DLLSources/CvCity.cpp
index 84305a77..12ee1bf1 100644
--- a/Project Files/DLLSources/CvCity.cpp
+++ b/Project Files/DLLSources/CvCity.cpp
@@ -9389,8 +9389,8 @@ int CvCity::getCityHealthChangeFromRessourcesInCityRadius() const
for (int iJ = 0; iJ < NUM_CITY_PLOTS; iJ++)
{
- CvPlot* pLoopPlot = getCityIndexPlot(iJ);
-
+ if(CvPlot* pLoopPlot = getCityIndexPlot(iJ))
+ {
if(pLoopPlot->getBonusType() != NO_BONUS)
{
// only if worked
@@ -9400,6 +9400,7 @@ int CvCity::getCityHealthChangeFromRessourcesInCityRadius() const
}
}
}
+ }
return iCityHealthChangeFromRessourcesInCityRadius;
}
@@ -9469,7 +9470,8 @@ int CvCity::getMonasteryCrossBonusForCity() const
int iMonsasteryCrossBonusModifier = GC.getDefineINT("MONASTERY_CROSSES_MODIFIER_FOR_CITY");
for (int iJ = 0; iJ < NUM_CITY_PLOTS; iJ++)
{
- CvPlot* pLoopPlot = getCityIndexPlot(iJ);
+ if (CvPlot* pLoopPlot = getCityIndexPlot(iJ))
+ {
// if it has a Monastery and a Missionary in it
if(pLoopPlot->isMonastery() && (pLoopPlot->getMonasteryMissionary() != NULL))
{
@@ -9485,6 +9487,7 @@ int CvCity::getMonasteryCrossBonusForCity() const
}
}
}
+ }
return iMonsasteryCrossBonus;
}
@@ -9500,7 +9503,8 @@ int CvCity::getFortDefenseBonusForCity() const
int iFortDefenseBonusModifier = GC.getDefineINT("FORT_DEFENSE_MODIFIER_FOR_CITY");
for (int iJ = 0; iJ < NUM_CITY_PLOTS; iJ++)
{
- CvPlot* pLoopPlot = getCityIndexPlot(iJ);
+ if (CvPlot* pLoopPlot = getCityIndexPlot(iJ))
+ {
// if it has a Fort that is protected
if(pLoopPlot->isFort() && (pLoopPlot->getFortDefender() != NULL))
{
@@ -9516,6 +9520,7 @@ int CvCity::getFortDefenseBonusForCity() const
}
}
}
+ }
return iFortDefenseBonus;
}
// WTP, ray, Improvements give Bonus to their City - END
@@ -9533,7 +9538,8 @@ int CvCity::getImprovementFoodModifierForCity() const
int FoodModifierForCity = 0;
for (int iJ = 0; iJ < NUM_CITY_PLOTS; iJ++)
{
- CvPlot* pLoopPlot = getCityIndexPlot(iJ);
+ if(CvPlot* pLoopPlot = getCityIndexPlot(iJ))
+ {
ImprovementTypes eImprovement = pLoopPlot->getImprovementType();
if(eImprovement != NO_IMPROVEMENT)
{
@@ -9548,6 +9554,7 @@ int CvCity::getImprovementFoodModifierForCity() const
}
}
}
+ }
return FoodModifierForCity;
}
@@ -9562,7 +9569,8 @@ int CvCity::getImprovementHammersModifierForCity() const
int HammersModifierForCity = 0;
for (int iJ = 0; iJ < NUM_CITY_PLOTS; iJ++)
{
- CvPlot* pLoopPlot = getCityIndexPlot(iJ);
+ if(CvPlot* pLoopPlot = getCityIndexPlot(iJ))
+ {
ImprovementTypes eImprovement = pLoopPlot->getImprovementType();
if(eImprovement != NO_IMPROVEMENT)
{
@@ -9577,6 +9585,7 @@ int CvCity::getImprovementHammersModifierForCity() const
}
}
}
+ }
return HammersModifierForCity;
}
@@ -9591,7 +9600,8 @@ int CvCity::getImprovementToolsModifierForCity() const
int ToolsModifierForCity = 0;
for (int iJ = 0; iJ < NUM_CITY_PLOTS; iJ++)
{
- CvPlot* pLoopPlot = getCityIndexPlot(iJ);
+ if(CvPlot* pLoopPlot = getCityIndexPlot(iJ))
+ {
ImprovementTypes eImprovement = pLoopPlot->getImprovementType();
if(eImprovement != NO_IMPROVEMENT)
{
@@ -9606,6 +9616,7 @@ int CvCity::getImprovementToolsModifierForCity() const
}
}
}
+ }
return ToolsModifierForCity;
}
// WTP, ray, Improvements give Bonus to their City - PART 2 - END