[host] platform: Close the exitEvent when done
This commit is contained in:
1 parent
ba8075a9fd
commit
7bcad37568
1 file changed
+8
-4
@@ -558,10 +558,14 @@ bool app_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (exitEvent &&
|
||||
!RegisterWaitForSingleObject(&app.exitWait, exitEvent, exitEventCallback, NULL,
|
||||
INFINITE, WT_EXECUTEONLYONCE))
|
||||
DEBUG_WINERROR("Failed to register wait for exit event", GetLastError());
|
||||
if (exitEvent)
|
||||
{
|
||||
if (!RegisterWaitForSingleObject(
|
||||
&app.exitWait, exitEvent, exitEventCallback, NULL,
|
||||
INFINITE, WT_EXECUTEONLYONCE))
|
||||
DEBUG_WINERROR("Failed to register wait for exit event", GetLastError());
|
||||
CloseHandle(exitEvent);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user