1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed CID 1288860

This commit is contained in:
AlexVinS 2016-11-25 16:09:14 +03:00
parent f50fd6d8db
commit 4e28efb8b4

View File

@ -2807,7 +2807,7 @@ void CBattleInterface::requestAutofightingAIToTakeAction()
boost::thread aiThread([&]
{
auto ba = new BattleAction(curInt->autofightingAI->activeStack(activeStack));
auto ba = make_unique<BattleAction>(curInt->autofightingAI->activeStack(activeStack));
if (curInt->isAutoFightOn)
{
@ -2823,12 +2823,11 @@ void CBattleInterface::requestAutofightingAIToTakeAction()
}
else
{
givenCommand->setn(ba);
givenCommand->setn(ba.release());
}
}
else
{
delete ba;
boost::unique_lock<boost::recursive_mutex> un(*LOCPLINT->pim);
activateStack();
}