Browse Source

Fix missing lock of player interface

Ivan Savenko 2 năm trước cách đây
mục cha
commit
631e93e846
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      client/gui/CGuiHandler.cpp

+ 2 - 0
client/gui/CGuiHandler.cpp

@@ -88,6 +88,8 @@ void CGuiHandler::handleEvents()
 void CGuiHandler::fakeMouseMove()
 {
 	dispatchMainThread([](){
+		assert(CPlayerInterface::pim);
+		boost::unique_lock lock(*CPlayerInterface::pim);
 		GH.events().dispatchMouseMoved(Point(0, 0), GH.getCursorPosition());
 	});
 }