mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +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(),
|
town->getNameTranslated(),
|
||||||
treat.danger,
|
treat.danger,
|
||||||
std::to_string(treat.turn),
|
std::to_string(treat.turn),
|
||||||
treat.hero->getNameTranslated());
|
treat.hero ? treat.hero->getNameTranslated() : std::string("<no hero>"));
|
||||||
|
|
||||||
handleCounterAttack(town, treat, treatNode.maximumDanger, tasks);
|
handleCounterAttack(town, treat, treatNode.maximumDanger, tasks);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user