UI: Fix crash when receiving multiple SIGINT

When there are two or more SIGINT signals were sent to obs, obs crashes
because the 2nd SIGINT calls `close` though the main window has been
deleted.
This commit is contained in:
Norihiro Kamae
2023-05-23 04:17:11 -07:00
committed by Lain
parent a874c19bef
commit 63e0bff5e6
+2 -1
View File
@@ -3264,7 +3264,8 @@ void OBSApp::ProcessSigInt(void)
recv(sigintFd[1], &tmp, sizeof(tmp), 0);
OBSBasic *main = reinterpret_cast<OBSBasic *>(GetMainWindow());
main->close();
if (main)
main->close();
#endif
}