[host] platform: Close the exitEvent when done

This commit is contained in:
Geoffrey McRae 2023-11-12 05:59:14 +11:00
parent ba8075a9fd
commit 7bcad37568

View File

@ -558,10 +558,14 @@ bool app_init(void)
} }
} }
if (exitEvent && if (exitEvent)
!RegisterWaitForSingleObject(&app.exitWait, exitEvent, exitEventCallback, NULL, {
INFINITE, WT_EXECUTEONLYONCE)) if (!RegisterWaitForSingleObject(
DEBUG_WINERROR("Failed to register wait for exit event", GetLastError()); &app.exitWait, exitEvent, exitEventCallback, NULL,
INFINITE, WT_EXECUTEONLYONCE))
DEBUG_WINERROR("Failed to register wait for exit event", GetLastError());
CloseHandle(exitEvent);
}
return true; return true;
} }