ソースを参照

Possible deadlock fixed.

Michał W. Urbańczyk 15 年 前
コミット
124f0dd401
1 ファイル変更5 行追加5 行削除
  1. 5 5
      client/CPlayerInterface.cpp

+ 5 - 5
client/CPlayerInterface.cpp

@@ -1267,11 +1267,7 @@ void CPlayerInterface::update()
 
 	if(terminate_cond.get())
 		return;
-
-	//in some conditions we may receive calls before selection is initialized - we must ignore them
-	if(!adventureInt->selection)
-		return;
-
+	
 	//if there are any waiting dialogs, show them
 	if(dialogs.size() && !showingDialog->get())
 	{
@@ -1280,6 +1276,10 @@ void CPlayerInterface::update()
 		dialogs.pop_front();
 	}
 
+	//in some conditions we may receive calls before selection is initialized - we must ignore them
+	if(!adventureInt->selection && GH.topInt() == adventureInt)
+		return;
+
 	GH.updateTime();
 	GH.handleEvents();