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

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

Issue 1845113002: DirectX based screen capturer logic (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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
Index: webrtc/modules/desktop_capture/win/cursor.cc
diff --git a/webrtc/modules/desktop_capture/win/cursor.cc b/webrtc/modules/desktop_capture/win/cursor.cc
index 304d5960d5ed7b3c450738ea31bf406b7cf23408..a46c40df9dcfe507987ee68112d8053522563794 100644
--- a/webrtc/modules/desktop_capture/win/cursor.cc
+++ b/webrtc/modules/desktop_capture/win/cursor.cc
@@ -110,11 +110,12 @@ bool HasAlphaChannel(const uint32_t* data, int stride, int width, int height) {
} // namespace
MouseCursor* CreateMouseCursorFromHCursor(HDC dc, HCURSOR cursor) {
- ICONINFO iinfo;
+ ICONINFO iinfo = { 0 };
if (!GetIconInfo(cursor, &iinfo)) {
LOG_F(LS_ERROR) << "Unable to get cursor icon info. Error = "
<< GetLastError();
- return NULL;
+ iinfo = { 0 };
+ assert(GetIconInfo(LoadCursor(nullptr, IDC_ARROW), &iinfo));
}
int hotspot_x = iinfo.xHotspot;

Powered by Google App Engine
This is Rietveld 408576698