From b7b17f36b9e3d2814dcf0f4db1fb329976c2e85a Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Mon, 8 Sep 2008 22:20:36 +0000 Subject: 2geom update (rev. 1578); fixes node editing of some degenerate paths (bzr r6784) --- src/2geom/path.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/2geom/path.cpp') diff --git a/src/2geom/path.cpp b/src/2geom/path.cpp index ac45459bd..c04d9d08d 100644 --- a/src/2geom/path.cpp +++ b/src/2geom/path.cpp @@ -226,6 +226,11 @@ double Path::nearestPoint(Point const &_point, double from, double to, double *d double eif, et = modf(to, &eif); unsigned int si = static_cast(sif); unsigned int ei = static_cast(eif); + if(sz == 0) {// naked moveto + if (distance_squared != NULL) + *distance_squared = distanceSq(_point, _path.initialPoint()); + return 0; + } if ( si == sz ) { --si; -- cgit v1.2.3