diff options
Diffstat (limited to 'src/pathops/SkDLineIntersection.cpp')
-rw-r--r-- | src/pathops/SkDLineIntersection.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp index 43c37decb8..5dcc067369 100644 --- a/src/pathops/SkDLineIntersection.cpp +++ b/src/pathops/SkDLineIntersection.cpp @@ -197,7 +197,8 @@ static int horizontal_coincident(const SkDLine& line, double y) { } double SkIntersections::HorizontalIntercept(const SkDLine& line, double y) { - return SkPinT((y - line[0].fY) / (line[1].fY - line[0].fY)); + SkASSERT(line[1].fY != line[0].fY); + return SkPinT((y - line[0].fY) / (line[1].fY - line[0].fY)); } int SkIntersections::horizontal(const SkDLine& line, double left, double right, @@ -274,6 +275,7 @@ static int vertical_coincident(const SkDLine& line, double x) { } double SkIntersections::VerticalIntercept(const SkDLine& line, double x) { + SkASSERT(line[1].fX != line[0].fX); return SkPinT((x - line[0].fX) / (line[1].fX - line[0].fX)); } |