mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix possible nullptr dereference
This commit is contained in:
parent
858f8b7c7c
commit
67b7c39761
@ -189,7 +189,7 @@ void DefenceBehavior::evaluateDefence(Goals::TGoalVec & tasks, const CGTownInsta
|
||||
town->getNameTranslated(),
|
||||
treat.danger,
|
||||
std::to_string(treat.turn),
|
||||
treat.hero->getNameTranslated());
|
||||
treat.hero ? treat.hero->getNameTranslated() : std::string("<no hero>"));
|
||||
|
||||
handleCounterAttack(town, treat, treatNode.maximumDanger, tasks);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user