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

Unified Diff: chrome/browser/media/webrtc/window_icon_util_win.cc

Issue 2617153002: Bug Fix: Crash When Getting Window Icon (Closed)
Patch Set: Created 3 years, 11 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: chrome/browser/media/webrtc/window_icon_util_win.cc
diff --git a/chrome/browser/media/webrtc/window_icon_util_win.cc b/chrome/browser/media/webrtc/window_icon_util_win.cc
index 1a6039b4706bcab24e493ca43404a6e973fcd112..7e3b2ec3bb6ce070dcb8a96973dd61977fc7e75f 100644
--- a/chrome/browser/media/webrtc/window_icon_util_win.cc
+++ b/chrome/browser/media/webrtc/window_icon_util_win.cc
@@ -36,5 +36,8 @@ gfx::ImageSkia GetWindowIcon(content::DesktopMediaID id) {
std::unique_ptr<SkBitmap> icon_bitmap(
IconUtil::CreateSkBitmapFromHICON(icon_handle));
+ if (!icon_bitmap)
+ return gfx::ImageSkia();
+
return gfx::ImageSkia::CreateFrom1xBitmap(*icon_bitmap);
}
« 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