| Index: base/process/process_posix.cc
|
| diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
|
| index a7d16f87304f2b38953c9ca9fe42f47e6c0c7634..bb987d0bbb7d453039a0445659d6d405a03032df 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;
|
|
|