diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-01-08 08:37:14 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-01-08 08:37:14 +0000 |
| commit | ec3f38afbebe6ba3131714b0b6f58a47d519f03e (patch) | |
| tree | 58baf5f773d570eeca52c819522edc6b99acdfaf /src | |
| parent | automatic file extension (diff) | |
| download | inkscape-ec3f38afbebe6ba3131714b0b6f58a47d519f03e.tar.gz inkscape-ec3f38afbebe6ba3131714b0b6f58a47d519f03e.zip | |
fix 1630193
(bzr r2156)
Diffstat (limited to 'src')
| -rw-r--r-- | src/nodepath.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 8371c8241..be0a2eb1e 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -1727,8 +1727,11 @@ void sp_node_selected_join() Inkscape::NodePath::Node *b = (Inkscape::NodePath::Node *) nodepath->selected->next->data; g_assert(a != b); - g_assert(a->p.other || a->n.other); - g_assert(b->p.other || b->n.other); + if (!(a->p.other || a->n.other) || !(b->p.other || b->n.other)) { + // someone tried to join an orphan node (i.e. a single-node subpath). + // this is not worth an error message, just fail silently. + return; + } if (((a->subpath->closed) || (b->subpath->closed)) || (a->p.other && a->n.other) || (b->p.other && b->n.other)) { nodepath->desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("To join, you must have <b>two endnodes</b> selected.")); @@ -1826,8 +1829,11 @@ void sp_node_selected_join_segment() Inkscape::NodePath::Node *b = (Inkscape::NodePath::Node *) nodepath->selected->next->data; g_assert(a != b); - g_assert(a->p.other || a->n.other); - g_assert(b->p.other || b->n.other); + if (!(a->p.other || a->n.other) || !(b->p.other || b->n.other)) { + // someone tried to join an orphan node (i.e. a single-node subpath). + // this is not worth an error message, just fail silently. + return; + } if (((a->subpath->closed) || (b->subpath->closed)) || (a->p.other && a->n.other) || (b->p.other && b->n.other)) { nodepath->desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("To join, you must have <b>two endnodes</b> selected.")); |
