1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

Fix freeze on closing game window while in game

This commit is contained in:
Ivan Savenko 2024-05-14 12:32:22 +00:00
parent 8807e05ee2
commit 22d51bd473

View File

@ -119,7 +119,10 @@ CServerHandler::~CServerHandler()
if (serverRunner) if (serverRunner)
serverRunner->wait(); serverRunner->wait();
serverRunner.reset(); serverRunner.reset();
threadNetwork.join(); {
auto unlockInterface = vstd::makeUnlockGuard(GH.interfaceMutex);
threadNetwork.join();
}
} }
catch (const std::runtime_error & e) catch (const std::runtime_error & e)
{ {