Index: src/image/SkSurface_Raster.cpp |
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp |
index b221c130e5e6f735acbd6b2a6fe0f515970de829..2bac3f3156f998a7f4e757c339751fa9b3fc455a 100644 |
--- a/src/image/SkSurface_Raster.cpp |
+++ b/src/image/SkSurface_Raster.cpp |
@@ -39,6 +39,10 @@ private: |
/////////////////////////////////////////////////////////////////////////////// |
bool SkSurface_Raster::Valid(const SkImageInfo& info, size_t rowBytes) { |
+ if (info.isEmpty()) { |
+ return false; |
+ } |
+ |
static const size_t kMaxTotalSize = SK_MaxS32; |
int shift = 0; |