aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r--src/core/SkBitmap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 25a6b1dba4..f2b56290ea 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;
}
}