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

Unified Diff: skia/ext/skia_utils_mac.mm

Issue 1539018: Mac: Make image dragging 162.4% more awesome. (Closed)
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | 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
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm
index 3568d88bc75c6e12730c163f4ac2465045cc9fb6..a913587b6edc2798bfe833094f7687ab62d9d15b 100644
--- a/skia/ext/skia_utils_mac.mm
+++ b/skia/ext/skia_utils_mac.mm
@@ -168,6 +168,9 @@ SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque) {
}
NSImage* SkBitmapToNSImage(const SkBitmap& skiaBitmap) {
+ if (skiaBitmap.isNull())
+ return nil;
+
// First convert SkBitmap to CGImageRef.
CGImageRef cgimage = SkCreateCGImageRef(skiaBitmap);
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698