1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +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
commit ff2ae1d2d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
});