Index: src/image/SkImage_Gpu.cpp |
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp |
index 350a1e88dec2ca37fafaa75463c27d72b7dc0272..8169b2a131b90f88911beccbffcbf6f6bc060f31 100644 |
--- a/src/image/SkImage_Gpu.cpp |
+++ b/src/image/SkImage_Gpu.cpp |
@@ -89,7 +89,7 @@ bool SkImage_Gpu::isOpaque() const { |
/////////////////////////////////////////////////////////////////////////////// |
SkImage* SkNewImageFromBitmapTexture(const SkBitmap& bitmap, int sampleCountForNewSurfaces) { |
- if (NULL == bitmap.getTexture()) { |
+ if (0 == bitmap.width() || 0 == bitmap.height() || NULL == bitmap.getTexture()) { |
return NULL; |
} |
return SkNEW_ARGS(SkImage_Gpu, (bitmap, sampleCountForNewSurfaces)); |