| Index: components/autofill/core/browser/autofill_external_delegate.cc
|
| diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
|
| index 4fca5220adbc669e5a3233ea6a3a5d9cb6fbf569..b493726ffa76b786c8e6767a44bc5e8fd1408a64 100644
|
| --- a/components/autofill/core/browser/autofill_external_delegate.cc
|
| +++ b/components/autofill/core/browser/autofill_external_delegate.cc
|
| @@ -169,8 +169,11 @@ void AutofillExternalDelegate::OnPopupShown(
|
|
|
| void AutofillExternalDelegate::OnPopupHidden(
|
| content::KeyboardListener* listener) {
|
| - if (registered_keyboard_listener_with_ == web_contents_->GetRenderViewHost())
|
| + if ((!web_contents_->IsBeingDestroyed()) &&
|
| + (registered_keyboard_listener_with_ ==
|
| + web_contents_->GetRenderViewHost())) {
|
| web_contents_->GetRenderViewHost()->RemoveKeyboardListener(listener);
|
| + }
|
|
|
| registered_keyboard_listener_with_ = NULL;
|
| }
|
|
|