Index: ui/views/widget/desktop_aura/desktop_screen_win.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.cc b/ui/views/widget/desktop_aura/desktop_screen_win.cc |
index d22bddc26f435d0bb16cdfb4c4d159bf19487a42..f36475e1d00d603964e9e0f7b29359bd1e68782f 100644 |
--- a/ui/views/widget/desktop_aura/desktop_screen_win.cc |
+++ b/ui/views/widget/desktop_aura/desktop_screen_win.cc |
@@ -52,7 +52,8 @@ gfx::Display DesktopScreenWin::GetDisplayMatching( |
} |
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const { |
- return window->GetRootWindow()->GetAcceleratedWidget(); |
+ aura::RootWindow* root_window = window->GetRootWindow(); |
+ return root_window ? root_window->GetAcceleratedWidget() : NULL; |
} |
gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { |