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