1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fix a few crashes

This commit is contained in:
Andrii Danylchenko
2022-04-04 10:16:32 +03:00
committed by Andrii Danylchenko
parent b97e5817ce
commit fa9a420f99
4 changed files with 54 additions and 13 deletions

View File

@@ -1148,7 +1148,7 @@ bool AINodeStorage::hasBetterChain(
{
auto sameNode = node.actor == candidateNode->actor;
if(sameNode || node.action == CGPathNode::ENodeAction::UNKNOWN || !node.actor->hero)
if(sameNode || node.action == CGPathNode::ENodeAction::UNKNOWN || !node.actor || !node.actor->hero)
{
continue;
}