| Index: base/process/process_posix.cc
|
| diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
|
| index a7d16f87304f2b38953c9ca9fe42f47e6c0c7634..0dbb0e5624523f19c4f38936f66ca08579aea04a 100644
|
| --- a/base/process/process_posix.cc
|
| +++ b/base/process/process_posix.cc
|
| @@ -193,11 +193,13 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle handle,
|
| if (!WaitpidWithTimeout(handle, &status, timeout))
|
| return false;
|
| if (WIFSIGNALED(status)) {
|
| - *exit_code = -1;
|
| + if (exit_code)
|
| + *exit_code = -1;
|
| return true;
|
| }
|
| if (WIFEXITED(status)) {
|
| - *exit_code = WEXITSTATUS(status);
|
| + if (exit_code)
|
| + *exit_code = WEXITSTATUS(status);
|
| return true;
|
| }
|
| return false;
|
|
|