From cc4e7c4b1097baee969ae4aea842d2c1c29c1620 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 7 Mar 2016 20:19:07 -0800 Subject: [PATCH] Oops, flush from queue before locking. Added this last and clearly didn't test it carefully. Fixes #8631. --- UI/GameInfoCache.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 3901033699..c82fe9fdcd 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -763,13 +763,14 @@ again: info = new GameInfo(); } + if (info->IsWorking()) { + // Uh oh, it's currently in process. It could mark pending = false with the wrong wantFlags. + // Let's wait it out, then queue. + WaitUntilDone(info); + } + { lock_guard lock(info->lock); - if (info->IsWorking()) { - // Uh oh, it's currently in process. It could mark pending = false with the wrong wantFlags. - // Let's wait it out, then queue. - WaitUntilDone(info); - } info->wantFlags |= wantFlags; info->pending = true; }