diff --git a/MarathonRecomp/install/update_checker.cpp b/MarathonRecomp/install/update_checker.cpp index 1738c58f1..0bae75966 100644 --- a/MarathonRecomp/install/update_checker.cpp +++ b/MarathonRecomp/install/update_checker.cpp @@ -20,6 +20,7 @@ static const char *CHECK_URL = "https://api.github.com/repos/sonicnext-dev/Marat static const char *VISIT_URL = "https://github.com/sonicnext-dev/MarathonRecomp/releases/latest"; static const char *USER_AGENT = "MarathonRecomp-Agent"; +static std::unique_ptr g_updateCheckerThread = nullptr; static std::atomic g_updateCheckerInProgress = false; static std::atomic g_updateCheckerFinished = false; static UpdateChecker::Result g_updateCheckerResult = UpdateChecker::Result::NotStarted; @@ -138,8 +139,8 @@ bool UpdateChecker::start() g_updateCheckerInProgress = true; g_updateCheckerFinished = false; - HostThread thread("Update Checker Thread", &updateCheckerThread); - thread.Detach(); + g_updateCheckerThread = std::make_unique("Update Checker Thread", &updateCheckerThread); + g_updateCheckerThread->Detach(); return true; }