Index: chrome/browser/autofill/autofill_manager.cc |
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc |
index aeeca26fbfef722c4a49830608ededf7de46c05d..73b1446718774323e8f0d7eab9a54bc5f701336b 100644 |
--- a/chrome/browser/autofill/autofill_manager.cc |
+++ b/chrome/browser/autofill/autofill_manager.cc |
@@ -779,6 +779,11 @@ void AutofillManager::OnRequestAutocomplete(const FormData& form) { |
} |
void AutofillManager::ReturnAutocompleteData(const FormStructure* result) { |
+ // web_contents() will be NULL when the interactive autocomplete is closed due |
+ // to a tab or browser window closing. |
+ if (!web_contents()) |
+ return; |
+ |
RenderViewHost* host = web_contents()->GetRenderViewHost(); |
if (!host) |
return; |