diff --git a/client/battle/BattleInterface.cpp b/client/battle/BattleInterface.cpp index 53fb5f3c7..1f49a635c 100644 --- a/client/battle/BattleInterface.cpp +++ b/client/battle/BattleInterface.cpp @@ -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); });