summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/node.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-08-14 14:40:06 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-08-14 14:40:06 +0000
commitf2bd49a175f20c29d6dd23b7380609dcfd7135c2 (patch)
treea407ac8a8b8145aff78139c59b09b9a868cec4a1 /src/ui/tool/node.cpp
parentFix funny behavior when dragging near the start node of a path (diff)
downloadinkscape-f2bd49a175f20c29d6dd23b7380609dcfd7135c2.tar.gz
inkscape-f2bd49a175f20c29d6dd23b7380609dcfd7135c2.zip
Fix a crash and add more safety checks to catch NULL pointers
(bzr r9713)
Diffstat (limited to '')
-rw-r--r--src/ui/tool/node.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 4c8cc74d8..f6fb6cc54 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -966,6 +966,11 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
}
}
sm.setupIgnoreSelection(_desktop, true, &unselected);
+ } else {
+ // even if we won't really snap, we might still call the one of the
+ // constrainedSnap() methods to enforce the constraints, so we need
+ // to setup the snapmanager anyway
+ sm.setup(_desktop);
}
if (held_control(*event)) {
@@ -1029,6 +1034,8 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
new_pos = sp.getPoint();
}
+ sm.unSetup();
+
SelectableControlPoint::dragged(new_pos, event);
}