summaryrefslogtreecommitdiffstats
path: root/ui/aura/desktop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/aura/desktop.cc')
-rw-r--r--ui/aura/desktop.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index 58eaec2e..010acf4 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -323,14 +323,12 @@ void Desktop::OnHostResized(const gfx::Size& size) {
}
void Desktop::SetActiveWindow(Window* window, Window* to_focus) {
- if (!window)
- return;
// The stacking client may impose rules on what window configurations can be
// activated or deactivated.
- if (!stacking_client_->CanActivateWindow(window))
+ if (window && !stacking_client_->CanActivateWindow(window))
return;
// The window may not be activate-able.
- if (!window->CanActivate())
+ if (window && !window->CanActivate())
return;
// Nothing may actually have changed.
if (active_window_ == window)