Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc

Issue 1309143007: Fix ScreenCapturerWinGdi to handle DesktopFrameWin::Create() errors. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc b/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
index 352433e1cdb5d79526e4ad5b6be518c31c5e1219..4d76fce0fa28d58a33b1d164c8594864dfd74117 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
@@ -241,9 +241,10 @@ bool ScreenCapturerWinGdi::CaptureImage() {
DesktopFrame::kBytesPerPixel;
SharedMemory* shared_memory = callback_->CreateSharedMemory(buffer_size);
- rtc::scoped_ptr<DesktopFrame> buffer;
- buffer.reset(
+ rtc::scoped_ptr<DesktopFrame> buffer(
DesktopFrameWin::Create(size, shared_memory, desktop_dc_));
+ if (!buffer.get())
+ return false;
queue_.ReplaceCurrentFrame(buffer.release());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698