Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index 5444c1caadedbb1f7dc5bbfecf8378340a46ec16..985d45966b2bd5b5dafb8170fc9a73f07acf9be8 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -840,8 +840,10 @@ SkShader* SkGradientShader::CreateTwoPointConical(const SkPoint& start, |
if (!valid_grad(colors, pos, colorCount, mode)) { |
return nullptr; |
} |
- if (start == end && startRadius == endRadius) { |
- return SkShader::CreateEmptyShader(); |
+ if (startRadius == endRadius) { |
+ if (start == end || startRadius == 0) { |
+ return SkShader::CreateEmptyShader(); |
+ } |
} |
EXPAND_1_COLOR(colorCount); |