summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cairo-spline-offset.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cairo-spline-offset.c b/src/cairo-spline-offset.c
index 211938c9..b7e09ad5 100644
--- a/src/cairo-spline-offset.c
+++ b/src/cairo-spline-offset.c
@@ -354,6 +354,11 @@ inflection_points (knots_t s)
solving gives:
x = -c/b
*/
+ if (b == 0.) {
+ /* no inflection points */
+ ret.t1 = ret.t2 = 1.;
+ ret.count = 0;
+ }
ret.t1 = -c/b;
ret.t2 = ret.t1;
ret.count = 1;