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

Avoid creation of new threads without mutex protection

This commit is contained in:
Ivan Savenko 2023-12-03 15:58:03 +02:00
parent aa2934853f
commit 3b3c4860b2

View File

@ -441,12 +441,10 @@ void AdventureMapInterface::onPlayerTurnStarted(PlayerColor playerID)
if(auto iw = GH.windows().topWindow<CInfoWindow>())
iw->close();
boost::thread newThread([this]()
GH.dispatchMainThread([this]()
{
hotkeyEndingTurn();
});
newThread.detach();
}
}