Index: extensions/browser/api/web_request/web_request_api.cc |
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc |
index 6af34768b95d232b8dd1d8a90960d516a9c858a1..279276b638c99a7c4e75ed801ee3a6de9cd2f173 100644 |
--- a/extensions/browser/api/web_request/web_request_api.cc |
+++ b/extensions/browser/api/web_request/web_request_api.cc |
@@ -997,8 +997,9 @@ ExtensionWebRequestEventRouter::OnAuthRequired( |
challenger->SetInteger(keys::kPortKey, auth_info.challenger.port()); |
dict->Set(keys::kChallengerKey, challenger); |
dict->Set(keys::kStatusLineKey, GetStatusLine(request->response_headers())); |
- dict->SetInteger(keys::kStatusCodeKey, |
- request->response_headers()->response_code()); |
+ if (request->response_headers()) |
+ dict->SetInteger(keys::kStatusCodeKey, |
+ request->response_headers()->response_code()); |
if (extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS) { |
dict->Set(keys::kResponseHeadersKey, |
GetResponseHeadersList(request->response_headers())); |