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:
parent
21fc80a315
commit
b436290d16
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user