Index: ui/views/widget/native_widget_aura.cc |
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc |
index f9ebed7e85f388a420e328720d7936ed7b80cc52..86012a5b5c49a84a21366e22678f38dd30a5b3ea 100644 |
--- a/ui/views/widget/native_widget_aura.cc |
+++ b/ui/views/widget/native_widget_aura.cc |
@@ -521,9 +521,14 @@ void NativeWidgetAura::Deactivate() { |
} |
bool NativeWidgetAura::IsActive() const { |
- return window_ && |
- aura::client::GetActivationClient(window_->GetRootWindow())-> |
- GetActiveWindow() == window_; |
+ if (!window_) |
+ return false; |
+ |
+ // We may up here during destruction of the root, in which case |
+ // GetRootWindow() returns NULL (~RootWindow() has run and we're in ~Window). |
+ aura::RootWindow* root = window_->GetRootWindow(); |
+ return root && |
+ aura::client::GetActivationClient(root)->GetActiveWindow() == window_; |
} |
void NativeWidgetAura::SetAlwaysOnTop(bool on_top) { |