From ae89d71672b3f0ea6baa40ce5eaa8b72278abc0c Mon Sep 17 00:00:00 2001 From: "Daniel K. O. (dkosmari)" Date: Wed, 5 Feb 2025 04:59:12 -0300 Subject: [PATCH] No need to test before destroying the thread, this test already exists inside `std::optional::reset()`. --- src/UpdaterCheck.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/UpdaterCheck.cpp b/src/UpdaterCheck.cpp index e21160e..44114e3 100644 --- a/src/UpdaterCheck.cpp +++ b/src/UpdaterCheck.cpp @@ -49,9 +49,7 @@ void RemoveButtonComboHandles(NotificationModuleHandle, void *) { } void StopUpdaterCheckThread() { - if (sCheckUpdateThread) { - sCheckUpdateThread.reset(); - } + sCheckUpdateThread.reset(); RemoveButtonComboHandles(0, nullptr); }