From bd81940434e5de391ffe9c719b5d2fed7afecd77 Mon Sep 17 00:00:00 2001 From: Gellule Xg Date: Fri, 13 Jan 2012 08:55:51 -1000 Subject: 2geom: Fixed an infinite loop where 2geom was trying to find the roots of an identically zero bezier. Fixed bugs: - https://launchpad.net/bugs/916171 (bzr r10880) --- src/2geom/solve-bezier.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/2geom/solve-bezier.cpp b/src/2geom/solve-bezier.cpp index b7c01b1f7..0a9f0e310 100644 --- a/src/2geom/solve-bezier.cpp +++ b/src/2geom/solve-bezier.cpp @@ -142,6 +142,10 @@ Bezier::find_bezier_roots(std::vector &solutions, //convex_hull_marching(bz, bz, solutions, left_t, right_t); //return; + //A constant bezier, even if identically zero, has no roots + if (bz.isConstant()) + return; + while(bz[0] == 0) { debug(std::cout << "deflate\n"); bz = bz.deflate(); -- cgit v1.2.3