mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Fix crash on right-clicking a neutral town
This commit is contained in:
@@ -225,6 +225,9 @@ TResources CGTownInstance::dailyIncome() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!getOwner().isValidPlayer())
|
||||||
|
return ret;
|
||||||
|
|
||||||
const auto & playerSettings = cb->getPlayerSettings(getOwner());
|
const auto & playerSettings = cb->getPlayerSettings(getOwner());
|
||||||
ret.applyHandicap(playerSettings->handicap.percentIncome);
|
ret.applyHandicap(playerSettings->handicap.percentIncome);
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user