Index: services/ui/ws/window_server.cc |
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc |
index 8bcba9bdff609e41ad46a6798a569cd83c50a86f..bd91a27b476e3550a1cc1902881899197cc47557 100644 |
--- a/services/ui/ws/window_server.cc |
+++ b/services/ui/ws/window_server.cc |
@@ -576,7 +576,7 @@ void WindowServer::FinishOperation() { |
void WindowServer::UpdateNativeCursorFromMouseLocation(ServerWindow* window) { |
WindowManagerDisplayRoot* display_root = |
display_manager_->GetWindowManagerDisplayRoot(window); |
- if (display_root) { |
+ if (display_root && display_root->window_manager_state()) { |
EventDispatcher* event_dispatcher = |
display_root->window_manager_state()->event_dispatcher(); |
event_dispatcher->UpdateCursorProviderByLastKnownLocation(); |
@@ -662,7 +662,7 @@ void WindowServer::OnWindowHierarchyChanged(ServerWindow* window, |
WindowManagerDisplayRoot* display_root = |
display_manager_->GetWindowManagerDisplayRoot(window); |
- if (display_root) |
+ if (display_root && display_root->window_manager_state()) |
display_root->window_manager_state() |
->ReleaseCaptureBlockedByAnyModalWindow(); |