Skip to content

Fix #217: Crash on shaping path with overlapping nodes

Max Gaukler requested to merge mgmax/inkscape:fix-217 into master

Thanks @yhoshi for pointing out the cause.

If a path has the following structure:

smooth segment -- "half-smooth node" (only left handle) -- line segment

then we restrict shaping (dragging) the smooth segment so that the "half-smooth" node does not become a cusp node. If the line segment has zero length, then Inkscape crashes.

This is difficult to trigger, even the "half-smooth" node is difficult to get: Use the Bezier tool, Click, Click-and-drag, then immediately click again without moving the mouse. Now you should have a smooth node with only one handle. A path of zero length can be made by manually changing the coordinates of the point.

This patch avoids the crash; however, behavior in this ill-defined case is still somewhat odd. Partly, it's not even clear what the correct behavior should be.

Edited by Max Gaukler

Merge request reports