summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/installer/util/helper.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/installer/util/helper.cc b/chrome/installer/util/helper.cc
index a87bcf9..af18e9e 100644
--- a/chrome/installer/util/helper.cc
+++ b/chrome/installer/util/helper.cc
@@ -73,9 +73,12 @@ bool installer::LaunchChromeAndWaitForResult(bool system_install,
}
DWORD wr = ::WaitForSingleObject(pi.hProcess, INFINITE);
- if (exit_code) {
- ::GetExitCodeProcess(pi.hProcess, reinterpret_cast<DWORD*>(exit_code));
- }
+ DWORD ret;
+ if (::GetExitCodeProcess(pi.hProcess, &ret) == 0)
+ return false;
+
+ if (exit_code)
+ *exit_code = ret;
::CloseHandle(pi.hProcess);
::CloseHandle(pi.hThread);