mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Properly lock UI mutex on accessing GUI state from network thread
This commit is contained in:
@@ -261,10 +261,11 @@ bool CVCMIServer::prepareToStartGame()
|
||||
Load::ProgressAccumulator progressTracking;
|
||||
Load::Progress current(1);
|
||||
progressTracking.include(current);
|
||||
auto currentProgress = std::numeric_limits<Load::Type>::max();
|
||||
|
||||
auto progressTrackingThread = boost::thread([this, &progressTracking, ¤tProgress]()
|
||||
|
||||
auto progressTrackingThread = boost::thread([this, &progressTracking]()
|
||||
{
|
||||
auto currentProgress = std::numeric_limits<Load::Type>::max();
|
||||
|
||||
while(!progressTracking.finished())
|
||||
{
|
||||
if(progressTracking.get() != currentProgress)
|
||||
|
||||
Reference in New Issue
Block a user