浏览代码

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();