Index: src/core/SkBitmap.cpp |
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp |
index 25a6b1dba44790ce0bee01bb22f4b92bfd54c426..f2b56290ea741204863dc61dc7a3d1a79e068d4b 100644 |
--- a/src/core/SkBitmap.cpp |
+++ b/src/core/SkBitmap.cpp |
@@ -298,7 +298,7 @@ bool SkBitmap::setConfig(Config config, int width, int height, size_t rowBytes, |
} |
if (rowBytes == 0) { |
rowBytes = SkBitmap::ComputeRowBytes(config, width); |
- if (0 == rowBytes && kNo_Config != config) { |
+ if (0 == rowBytes && kNo_Config != config && width > 0) { |
goto BAD_CONFIG; |
} |
} |