summaryrefslogtreecommitdiff
path: root/chromium/ui/ozone/platform/wayland/host/wayland_screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/ozone/platform/wayland/host/wayland_screen.cc')
-rw-r--r--chromium/ui/ozone/platform/wayland/host/wayland_screen.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chromium/ui/ozone/platform/wayland/host/wayland_screen.cc b/chromium/ui/ozone/platform/wayland/host/wayland_screen.cc
index 241b037b5b3..54fb4cf6487 100644
--- a/chromium/ui/ozone/platform/wayland/host/wayland_screen.cc
+++ b/chromium/ui/ozone/platform/wayland/host/wayland_screen.cc
@@ -129,7 +129,15 @@ void WaylandScreen::OnOutputRemoved(uint32_t output_id) {
}
}
}
- display_list_.RemoveDisplay(output_id);
+ // TODO(https://crbug.com/1299403): Work around the symptoms of a common
+ // crash. Unclear if this is the proper long term solution.
+ auto it = display_list_.FindDisplayById(output_id);
+ DCHECK(it != display_list_.displays().end());
+ if (it != display_list_.displays().end()) {
+ display_list_.RemoveDisplay(output_id);
+ } else {
+ LOG(ERROR) << "output_id is not associated with a Display.";
+ }
}
void WaylandScreen::AddOrUpdateDisplay(uint32_t output_id,