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

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

Issue 2852793002: This change fixes a crash issue in WindowCapturerWin. The issue and fix are both obvious, WindowCap… (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 31ad0b0acac2055173747bcb7614c852699df680..1afd2341b3f09d2496b5ff9ba5002c1a579f6390 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