Chromium Code Reviews| 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 f8280fb99d0b81b3a8c612e3b24fd5a8ec6779b6..eb8ccdb813b3efe7f2677d199433f2f911662703 100644 |
| --- a/components/autofill/core/browser/autofill_external_delegate.cc |
| +++ b/components/autofill/core/browser/autofill_external_delegate.cc |
| @@ -169,7 +169,8 @@ 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); |
|
Ilya Sherman
2013/07/03 19:56:49
nit: Please add curly braces now that the conditio
blundell
2013/07/04 08:32:45
Done.
|
| registered_keyboard_listener_with_ = NULL; |