mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Capture members by copy instead of capturing this due to short lifetime
This commit is contained in:
parent
ced0bbe526
commit
2861ebb515
@ -729,7 +729,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([this, activeStack]()
|
||||
boost::thread aiThread([battleID = this->battleID, curInt = this->curInt, activeStack]()
|
||||
{
|
||||
setThreadName("autofightingAI");
|
||||
curInt->autofightingAI->activeStack(battleID, activeStack);
|
||||
|
Loading…
Reference in New Issue
Block a user