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

Unified Diff: webrtc/modules/desktop_capture/window_capturer_win.cc

Issue 2835553002: Crash in WindowCapturerWin (Closed)
Patch Set: Created 3 years, 8 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/window_capturer_win.cc
diff --git a/webrtc/modules/desktop_capture/window_capturer_win.cc b/webrtc/modules/desktop_capture/window_capturer_win.cc
index d796d0f4fb651ac600044bc86becc47a73a2eb6f..0ca88cfa555a4c070176cdc074e57b4187ae533e 100644
--- a/webrtc/modules/desktop_capture/window_capturer_win.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_win.cc
@@ -252,12 +252,12 @@ void WindowCapturerWin::CaptureFrame() {
frame->mutable_updated_region()->SetRect(
DesktopRect::MakeSize(frame->size()));
- if (!result) {
+ if (result) {
+ callback_->OnCaptureResult(Result::SUCCESS, std::move(frame));
+ } else {
LOG(LS_ERROR) << "Both PrintWindow() and BitBlt() failed.";
- frame.reset();
+ callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
}
-
- callback_->OnCaptureResult(Result::SUCCESS, std::move(frame));
}
} // namespace
« 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