From 2918d77e5845baf5677e91aacd9331ae0a257f77 Mon Sep 17 00:00:00 2001 From: derrod Date: Sun, 14 May 2023 00:25:10 +0200 Subject: [PATCH] UI: Process Qt events once after destroy queue finishes --- UI/window-basic-main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 73764e06d..517c34ae3 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -4895,6 +4895,11 @@ void OBSBasic::ClearSceneData() QApplication::sendPostedEvents(nullptr); } 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(); /* If scene data wasn't actually cleared, e.g. faulty plugin holding a