1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #2414 from IvanSavenko/fix_autocombat_crash

Fix autocombat crash
This commit is contained in:
Ivan Savenko
2023-07-26 02:02:28 +03:00
committed by GitHub

View File

@@ -727,7 +727,7 @@ void BattleInterface::requestAutofightingAIToTakeAction()
// FIXME: unsafe
// Run task in separate thread to avoid UI lock while AI is making turn (which might take some time)
// HOWEVER this thread won't atttempt to lock game state, potentially leading to races
boost::thread aiThread([&]()
boost::thread aiThread([this, activeStack]()
{
curInt->autofightingAI->activeStack(activeStack);
});