Index: webrtc/modules/desktop_capture/screen_capturer_x11.cc |
diff --git a/webrtc/modules/desktop_capture/screen_capturer_x11.cc b/webrtc/modules/desktop_capture/screen_capturer_x11.cc |
index b4f3bf575b84e64acb4f3d231c0d024bff50c365..ed31774070805716826f913ad7dd33458c5f560c 100644 |
--- a/webrtc/modules/desktop_capture/screen_capturer_x11.cc |
+++ b/webrtc/modules/desktop_capture/screen_capturer_x11.cc |
@@ -340,7 +340,8 @@ std::unique_ptr<DesktopFrame> ScreenCapturerLinux::CaptureScreen() { |
// Doing full-screen polling, or this is the first capture after a |
// screen-resolution change. In either case, need a full-screen capture. |
DesktopRect screen_rect = DesktopRect::MakeSize(frame->size()); |
- x_server_pixel_buffer_.CaptureRect(screen_rect, frame.get()); |
+ if (!x_server_pixel_buffer_.CaptureRect(screen_rect, frame.get())) |
+ return nullptr; |
updated_region->SetRect(screen_rect); |
} |