1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix crash on right-clicking a neutral town

This commit is contained in:
Ivan Savenko 2024-08-29 15:45:46 +00:00
parent 21fc80a315
commit b436290d16

View File

@ -225,6 +225,9 @@ TResources CGTownInstance::dailyIncome() const
}
}
if (!getOwner().isValidPlayer())
return ret;
const auto & playerSettings = cb->getPlayerSettings(getOwner());
ret.applyHandicap(playerSettings->handicap.percentIncome);
return ret;