Index: Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp |
=================================================================== |
--- Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp (revision 139669) |
+++ Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp (working copy) |
@@ -188,7 +188,7 @@ |
{ |
SkAutoLockPixels bitmapLock(bitmap); |
- if (bitmap.config() != SkBitmap::kARGB_8888_Config) |
+ if (bitmap.config() != SkBitmap::kARGB_8888_Config || !bitmap.getPixels()) |
return false; // Only support 32 bit/pixel skia bitmaps. |
return encodePixels(IntSize(bitmap.width(), bitmap.height()), static_cast<unsigned char *>(bitmap.getPixels()), true, quality, output); |