Index: Source/WebCore/platform/image-encoders/skia/WEBPImageEncoder.cpp |
=================================================================== |
--- Source/WebCore/platform/image-encoders/skia/WEBPImageEncoder.cpp (revision 139669) |
+++ Source/WebCore/platform/image-encoders/skia/WEBPImageEncoder.cpp (working copy) |
@@ -122,7 +122,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); |