diff options
Diffstat (limited to 'src/2geom/path.cpp')
| -rw-r--r-- | src/2geom/path.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<unsigned int>(sif); unsigned int ei = static_cast<unsigned int>(eif); + if(sz == 0) {// naked moveto + if (distance_squared != NULL) + *distance_squared = distanceSq(_point, _path.initialPoint()); + return 0; + } if ( si == sz ) { --si; |
