1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Merge pull request #1241 from trofi/catch-by-reference

AI/Nullkiller/Goals/ExecuteHeroChain.cpp: catch polymorphic exception…
This commit is contained in:
Andrii Danylchenko
2022-12-18 09:07:18 +02:00
committed by GitHub

View File

@@ -127,7 +127,7 @@ void ExecuteHeroChain::accept(AIGateway * ai)
continue;
}
}
catch(cannotFulfillGoalException)
catch(cannotFulfillGoalException &)
{
if(!heroPtr.validAndSet())
{
@@ -173,7 +173,7 @@ void ExecuteHeroChain::accept(AIGateway * ai)
ai->nullkiller->lockHero(hero, HeroLockedReason::HERO_CHAIN);
blockedIndexes.insert(node.parentIndex);
}
catch(goalFulfilledException)
catch(goalFulfilledException &)
{
if(!heroPtr.validAndSet())
{