diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkPath.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index aabcafdd11..5cd6316c7f 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -2812,7 +2812,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 @@ -3049,7 +3051,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; |