From a48709cda4af83cf56ced5d85d9640de8e91984d Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 13 Jul 2008 22:59:50 +0000 Subject: small code cleanup using newly discovered 2geom method :) (bzr r6289) --- src/nodepath.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nodepath.cpp') diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 89d1d3e8b..02e700ac1 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -527,9 +527,9 @@ static void subpaths_from_pathvector(Inkscape::NodePath::Path *np, Geom::PathVec // Add last knot (because sp_nodepath_subpath_close kills the last knot) /* Remember that last closing segment is always a lineto, but its length can be zero if the path is visually closed already * If the length is zero, don't add it to the nodepath. */ - Geom::Curve const &back = pit->back_closed(); - if ( back.initialPoint() != back.finalPoint() ) { - NR::Point pos = from_2geom(back.finalPoint()) * np->i2d; + Geom::Curve const &closing_seg = pit->back_closed(); + if ( ! closing_seg.isDegenerate() ) { + NR::Point pos = from_2geom(closing_seg.finalPoint()) * np->i2d; sp_nodepath_node_new(sp, NULL, t[i++], NR_LINETO, &pos, &pos, &pos); } -- cgit v1.2.3