diff --git a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc index 4b7cbf54cb..d5dcd7af86 100644 --- a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc +++ b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc @@ -185,6 +185,10 @@ void ScreenCapturerX11::InitXrandr() { RTC_NO_SANITIZE("cfi-icall") void ScreenCapturerX11::UpdateMonitors() { + // The queue should be reset whenever |selected_monitor_rect_| changes, so + // that the DCHECKs in CaptureScreen() are satisfied. + queue_.Reset(); + if (monitors_) { free_monitors_(monitors_); monitors_ = nullptr;