Index: src/core/SkPath.cpp |
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp |
index fbda7e8772f6770ee71de6748869f1e049d21a18..73f458f3148722fc239a802cabeaff2e8e757e99 100644 |
--- a/src/core/SkPath.cpp |
+++ b/src/core/SkPath.cpp |
@@ -2800,7 +2800,9 @@ static int winding_mono_cubic(const SkPoint pts[], SkScalar x, SkScalar y, int* |
// compute the actual x(t) value |
SkScalar t; |
- SkAssertResult(SkCubicClipper::ChopMonoAtY(pts, y, &t)); |
+ if (!SkCubicClipper::ChopMonoAtY(pts, y, &t)) { |
+ return 0; |
+ } |
SkScalar xt = eval_cubic_pts(pts[0].fX, pts[1].fX, pts[2].fX, pts[3].fX, t); |
if (SkScalarNearlyEqual(xt, x)) { |
if (x != pts[3].fX || y != pts[3].fY) { // don't test end points; they're start points |
@@ -3037,7 +3039,9 @@ static void tangent_cubic(const SkPoint pts[], SkScalar x, SkScalar y, |
for (int i = 0; i <= n; ++i) { |
SkPoint* c = &dst[i * 3]; |
SkScalar t; |
- SkAssertResult(SkCubicClipper::ChopMonoAtY(c, y, &t)); |
+ if (!SkCubicClipper::ChopMonoAtY(c, y, &t)) { |
+ continue; |
+ } |
SkScalar xt = eval_cubic_pts(c[0].fX, c[1].fX, c[2].fX, c[3].fX, t); |
if (!SkScalarNearlyEqual(x, xt)) { |
continue; |