Browse Source

UI: Fix crash on patronJsonThread

If a user exit obs while patronJsonThread is running, the thread crashed
with the error below.
  QThread: Destroyed while thread is still running

(cherry picked from commit b21edafe980c894456a9b699859814b9e8829d9d)
Norihiro Kamae 2 years ago
parent
commit
e4142c8740
1 changed files with 3 additions and 0 deletions
  1. 3 0
      UI/window-basic-main.cpp

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

@@ -2793,6 +2793,9 @@ OBSBasic::~OBSBasic()
 	if (updateCheckThread && updateCheckThread->isRunning())
 		updateCheckThread->wait();
 
+	if (patronJsonThread && patronJsonThread->isRunning())
+		patronJsonThread->wait();
+
 	delete screenshotData;
 	delete previewProjector;
 	delete studioProgramProjector;