summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/2geom/sbasis-to-bezier.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/2geom/sbasis-to-bezier.cpp b/src/2geom/sbasis-to-bezier.cpp
index 8a18cfd4a..64c07f35e 100644
--- a/src/2geom/sbasis-to-bezier.cpp
+++ b/src/2geom/sbasis-to-bezier.cpp
@@ -197,6 +197,8 @@ void sbasis_to_cubic_bezier (std::vector<Point> & bz, D2<SBasis> const& sb)
}
sbasis_to_bezier(bz, sb, 4); // zeroth-order estimate
+ if ((sb[X].size() < 3) && (sb[Y].size() < 3))
+ return; // cubic bezier estimate is exact
Geom::ConvexHull bezhull(bz);
// calculate first derivatives of x and y wrt t