| Index: syzygy/agent/asan/reporters/crashpad_reporter.cc
|
| diff --git a/syzygy/agent/asan/reporters/crashpad_reporter.cc b/syzygy/agent/asan/reporters/crashpad_reporter.cc
|
| index f0f05bfc328debcd3487b29e1d56b7302838fd14..39356700cabbb1efd3bb2b9b703f817701a9b809 100644
|
| --- a/syzygy/agent/asan/reporters/crashpad_reporter.cc
|
| +++ b/syzygy/agent/asan/reporters/crashpad_reporter.cc
|
| @@ -49,13 +49,17 @@ bool EnsureCrashpadConnected() {
|
| // Only initialize once.
|
| if (initialized)
|
| return crashpad_present;
|
| - initialized = true;
|
|
|
| // Get the name of the crashpad endpoint, failing if none exists.
|
| std::unique_ptr<base::Environment> env(base::Environment::Create());
|
| std::string pipe_name;
|
| if (!env->GetVar(kCrashpadPipeNameVar, &pipe_name))
|
| return false;
|
| +
|
| + // Only flip the initialization bit once we've been able to read the
|
| + // environment variable to make this work if Crashpad wasn't present
|
| + // during the process initialization but is here later.
|
| + initialized = true;
|
| std::wstring pipe_name_w = base::UTF8ToWide(pipe_name);
|
|
|
| // Initialize the crashpad client.
|
|
|