diff options
| author | Silent <zdanio95@gmail.com> | 2019-06-24 20:55:52 +0200 |
|---|---|---|
| committer | Silent <zdanio95@gmail.com> | 2019-07-22 19:29:22 +0200 |
| commit | a00dfeecf0a7742366a32081d837fec1ebcead14 (patch) | |
| tree | 9fba0e94dd6d7efbe04a6eb79bb8d10534b5d474 /Source/Core/WinUpdater/WinUI.cpp | |
| parent | d355abaf0cb064963b9c6a4b99d5c70fe61ebf5a (diff) | |
WinUpdater: Properly account for failure in WaitForPID
Diffstat (limited to 'Source/Core/WinUpdater/WinUI.cpp')
| -rw-r--r-- | Source/Core/WinUpdater/WinUI.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/WinUpdater/WinUI.cpp b/Source/Core/WinUpdater/WinUI.cpp index d65b00033d..97f2da459b 100644 --- a/Source/Core/WinUpdater/WinUI.cpp +++ b/Source/Core/WinUpdater/WinUI.cpp @@ -251,8 +251,11 @@ void Sleep(int sleep) void WaitForPID(u32 pid) { HANDLE parent_handle = OpenProcess(SYNCHRONIZE, FALSE, static_cast<DWORD>(pid)); - WaitForSingleObject(parent_handle, INFINITE); - CloseHandle(parent_handle); + if (parent_handle) + { + WaitForSingleObject(parent_handle, INFINITE); + CloseHandle(parent_handle); + } } void SetVisible(bool visible) |
