From 11944f24763c8557bba61a3e057a14084c8b71e8 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 7 Aug 2023 22:15:21 +0200 Subject: [PATCH] Remove false error entirely Just don't log it at all, the 'WaitForSingleObject()' will take care of most things. --- r5dev/sdklauncher/sdkupdater.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/r5dev/sdklauncher/sdkupdater.cpp b/r5dev/sdklauncher/sdkupdater.cpp index 36782ec1..66ca0231 100644 --- a/r5dev/sdklauncher/sdkupdater.cpp +++ b/r5dev/sdklauncher/sdkupdater.cpp @@ -131,15 +131,9 @@ int main(int argc, char** argv) // If the launcher is still running, terminate it. if (launcher) { - BOOL terminateResult = TerminateProcess(launcher, 1); - - if (!terminateResult) - { - // Don't return, we still attempt to wait - // as the launcher will terminate it self - // still from its own code. - ErrorAndExit("TerminateProcess"); - } + // Make sure the launcher is getting terminated if + // 'ExitProcess()' somehow failed. + TerminateProcess(launcher, 1); DWORD waitResult = WaitForSingleObject(launcher, UPDATER_SLEEP_TIME_BEFORE_EXIT);