Index: src/core/SkWriteBuffer.cpp |
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp |
index ac3d678dbc011a70b9c38cdd91ce4199f633750c..1dfe0b3972c62b6b8e68cc6f6d92dc8782935b97 100644 |
--- a/src/core/SkWriteBuffer.cpp |
+++ b/src/core/SkWriteBuffer.cpp |
@@ -223,7 +223,7 @@ void SkWriteBuffer::writeImage(const SkImage* image) { |
this->writeInt(image->height()); |
SkAutoTUnref<SkData> encoded(image->encode(this->getPixelSerializer())); |
- if (encoded) { |
+ if (encoded && encoded->size() > 0) { |
write_encoded_bitmap(this, encoded, SkIPoint::Make(0, 0)); |
return; |
} |