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:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f