From: Cheng Zhao Date: Tue, 22 Oct 2013 01:33:38 +0000 (+0800) Subject: Fix a possible crash when calling AdapterRequestJob::Kill(). X-Git-Tag: v0.6.4~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=640f45a5b3c2990b7fe8ec466946e87d61ba59d0;p=electron.git Fix a possible crash when calling AdapterRequestJob::Kill(). --- diff --git a/browser/net/adapter_request_job.cc b/browser/net/adapter_request_job.cc index 12449227..7dea1126 100644 --- a/browser/net/adapter_request_job.cc +++ b/browser/net/adapter_request_job.cc @@ -30,8 +30,8 @@ void AdapterRequestJob::Start() { } void AdapterRequestJob::Kill() { - DCHECK(real_job_); - real_job_->Kill(); + if (real_job_) // Kill could happen when real_job_ is created. + real_job_->Kill(); } bool AdapterRequestJob::ReadRawData(net::IOBuffer* buf,