From: buliabyak Date: Mon, 15 May 2006 13:58:09 +0000 (+0000) Subject: fix potential (though currently impossible) crash when spatial mode is used with... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6784119129700c7abaff8c3dfe75916cba09ce32;p=inkscape.git fix potential (though currently impossible) crash when spatial mode is used with a single node --- diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 236912851..4b9559737 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -1165,10 +1165,15 @@ sp_nodepath_selected_nodes_sculpt(Inkscape::NodePath::Path *nodepath, Inkscape:: for (GList *nl = subpath->nodes; nl != NULL; nl = nl->next) { Inkscape::NodePath::Node *node = (Inkscape::NodePath::Node *) nl->data; if (node->selected) { - sp_nodepath_move_node_and_handles (node, + if (direct_range > 1e-6) { + sp_nodepath_move_node_and_handles (node, sculpt_profile (NR::L2(node->origin - n->origin) / direct_range, alpha) * delta, sculpt_profile (NR::L2(node->n.origin - n->origin) / direct_range, alpha) * delta, sculpt_profile (NR::L2(node->p.origin - n->origin) / direct_range, alpha) * delta); + } else { + sp_nodepath_move_node_and_handles (node, delta, delta, delta); + } + } } }