| Index: chrome/browser/ui/views/extensions/extension_popup.cc
|
| diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc
|
| index 566858620dd3e837200f8332096742344a5f33f2..838e2689d359853649a983819f45a3911b176ab0 100644
|
| --- a/chrome/browser/ui/views/extensions/extension_popup.cc
|
| +++ b/chrome/browser/ui/views/extensions/extension_popup.cc
|
| @@ -158,7 +158,10 @@ void ExtensionPopup::OnWidgetDestroying(views::Widget* widget) {
|
| aura::Window* bubble_window = GetWidget()->GetNativeWindow();
|
| aura::client::ActivationClient* activation_client =
|
| aura::client::GetActivationClient(bubble_window->GetRootWindow());
|
| - activation_client->RemoveObserver(this);
|
| + // If the popup was being inspected with devtools and the browser window was
|
| + // closed, then the root window and activation client are already destroyed.
|
| + if (activation_client)
|
| + activation_client->RemoveObserver(this);
|
| #endif
|
| }
|
|
|
|
|