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

Unified Diff: skia/ext/skia_utils_mac.mm

Issue 149173: A null CGImageRef should be treated as a "null" SkBitmap,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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: skia/ext/skia_utils_mac.mm
===================================================================
--- skia/ext/skia_utils_mac.mm (revision 19827)
+++ skia/ext/skia_utils_mac.mm (working copy)
@@ -84,7 +84,8 @@
}
SkBitmap CGImageToSkBitmap(CGImageRef image) {
- DCHECK(image != NULL);
+ if (!image)
+ return SkBitmap();
int width = CGImageGetWidth(image);
int height = CGImageGetHeight(image);
« 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