Code

Fix node editor crash when dragging near the last node of a path
[inkscape.git] / src / ui / tool / path-manipulator.cpp
index 66f72f379ee985706ba107d7d4492da579804cee..8ce7a9e74feba0926a099231d6bcf8b03648ed06 100644 (file)
@@ -1414,7 +1414,7 @@ void PathManipulator::_updateDragPoint(Geom::Point const &evp)
     NodeList::iterator first = (*spi)->before(pvp->t, &fracpart);
     
     double stroke_tolerance = _getStrokeTolerance();
-    if (Geom::distance(evp, nearest_point) < stroke_tolerance) {
+    if (first && first.next() && Geom::distance(evp, nearest_point) < stroke_tolerance) {
         _dragpoint->setVisible(true);
         _dragpoint->setPosition(_desktop->w2d(nearest_point));
         _dragpoint->setSize(2 * stroke_tolerance);