浏览代码

UI: Process Qt events once after destroy queue finishes

derrod 2 年之前
父节点
当前提交
2918d77e58
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      UI/window-basic-main.cpp

+ 5 - 0
UI/window-basic-main.cpp

@@ -4895,6 +4895,11 @@ void OBSBasic::ClearSceneData()
 		QApplication::sendPostedEvents(nullptr);
 		QApplication::sendPostedEvents(nullptr);
 	} while (obs_wait_for_destroy_queue());
 	} while (obs_wait_for_destroy_queue());
 
 
+	/* Pump Qt events one final time to give remaining signals time to be
+	 * processed (since this happens after the destroy thread finishes and
+	 * the audio/video threads have processed their tasks). */
+	QApplication::sendPostedEvents(nullptr);
+
 	unsetCursor();
 	unsetCursor();
 
 
 	/* If scene data wasn't actually cleared, e.g. faulty plugin holding a
 	/* If scene data wasn't actually cleared, e.g. faulty plugin holding a