Browse Source

UI: Stop virtual camera if active while exiting

Avoid potential memory leaks and crashes.
tytan652 2 years ago
parent
commit
6734c9cbc8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      UI/window-basic-main.cpp

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

@@ -4844,6 +4844,9 @@ void OBSBasic::closeEvent(QCloseEvent *event)
 
 	closing = true;
 
+	if (outputHandler->VirtualCamActive())
+		outputHandler->StopVirtualCam();
+
 	if (introCheckThread)
 		introCheckThread->wait();
 	if (whatsNewInitThread)