Index: webrtc/modules/desktop_capture/window_capturer_x11.cc |
diff --git a/webrtc/modules/desktop_capture/window_capturer_x11.cc b/webrtc/modules/desktop_capture/window_capturer_x11.cc |
index e4a0917b9063dfd89a87eb906660d7d83040e409..bae185236d5cb589ab24c7930f9aa24018699840 100644 |
--- a/webrtc/modules/desktop_capture/window_capturer_x11.cc |
+++ b/webrtc/modules/desktop_capture/window_capturer_x11.cc |
@@ -293,8 +293,11 @@ void WindowCapturerLinux::CaptureFrame() { |
new BasicDesktopFrame(x_server_pixel_buffer_.window_size())); |
x_server_pixel_buffer_.Synchronize(); |
- x_server_pixel_buffer_.CaptureRect(DesktopRect::MakeSize(frame->size()), |
- frame.get()); |
+ if (!x_server_pixel_buffer_.CaptureRect(DesktopRect::MakeSize(frame->size()), |
+ frame.get())) { |
+ callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); |
+ return; |
+ } |
frame->mutable_updated_region()->SetRect( |
DesktopRect::MakeSize(frame->size())); |