Index: Source/core/css/CSSGradientValue.cpp |
diff --git a/Source/core/css/CSSGradientValue.cpp b/Source/core/css/CSSGradientValue.cpp |
index 0c6e578aac69a728e056d2bc82ffca7ecaeac8e5..5b7ea0b2892a6f02cfa71c77039f7fac5485097d 100644 |
--- a/Source/core/css/CSSGradientValue.cpp |
+++ b/Source/core/css/CSSGradientValue.cpp |
@@ -276,7 +276,7 @@ void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, Rend |
} |
if (maxLengthForRepeat > gradientLength) |
- maxExtent = maxLengthForRepeat / gradientLength; |
+ maxExtent = gradientLength > 0 ? maxLengthForRepeat / gradientLength : 0; |
} |
size_t originalNumStops = numStops; |