Close handle when waiting is end
This commit is contained in:
parent
1347c61c8e
commit
14803e4cf8
1 changed files with 3 additions and 1 deletions
|
@ -51,8 +51,10 @@ void CrashReporterWin::InitBreakpad(const std::string& product_name,
|
|||
// Wait until the crash service is started.
|
||||
HANDLE waiting_event =
|
||||
::CreateEventW(NULL, TRUE, FALSE, L"g_atom_shell_crash_service");
|
||||
if (waiting_event != INVALID_HANDLE_VALUE)
|
||||
if (waiting_event != NULL) {
|
||||
WaitForSingleObject(waiting_event, 1000);
|
||||
CloseHandle(waiting_event);
|
||||
}
|
||||
|
||||
// ExceptionHandler() attaches our handler and ~ExceptionHandler() detaches
|
||||
// it, so we must explicitly reset *before* we instantiate our new handler
|
||||
|
|
Loading…
Add table
Reference in a new issue