Index: ash/display/screen_ash.cc |
diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc |
index d5c33a4e65b5f2c7e37828f13c25fb7be3cf048f..853669206f8301d1646bcde8d97e49a12b00cda8 100644 |
--- a/ash/display/screen_ash.cc |
+++ b/ash/display/screen_ash.cc |
@@ -130,6 +130,8 @@ gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const { |
if (!root_window) |
return GetPrimaryDisplay(); |
const RootWindowSettings* rws = GetRootWindowSettings(root_window); |
+ if (!rws) |
+ return GetPrimaryDisplay(); |
sky
2016/02/03 22:43:48
Code like this shouldn't be hit. I think we should
sadrul
2016/02/04 00:03:42
Acknowledged.
|
int64_t id = rws->display_id; |
// if id is |kInvaildDisplayID|, it's being deleted. |
DCHECK(id != gfx::Display::kInvalidDisplayID); |