WinUpdater: Properly account for failure in WaitForPID

This commit is contained in:
Silent 2019-06-24 20:55:52 +02:00
parent d355abaf0c
commit a00dfeecf0
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1

View File

@ -251,9 +251,12 @@ void Sleep(int sleep)
void WaitForPID(u32 pid)
{
HANDLE parent_handle = OpenProcess(SYNCHRONIZE, FALSE, static_cast<DWORD>(pid));
if (parent_handle)
{
WaitForSingleObject(parent_handle, INFINITE);
CloseHandle(parent_handle);
}
}
void SetVisible(bool visible)
{