From: dooglus Date: Tue, 23 Sep 2008 12:19:26 +0000 (+0000) Subject: Fix 1959064: Crash when use circle tool over an existing duck. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=23afd999cfa673044db848f8b6c2f9eccb6c639f;p=synfig.git Fix 1959064: Crash when use circle tool over an existing duck. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2066 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/state_circle.cpp b/synfig-studio/trunk/src/gtkmm/state_circle.cpp index f23632c..09667ad 100644 --- a/synfig-studio/trunk/src/gtkmm/state_circle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_circle.cpp @@ -934,6 +934,7 @@ StateCircle_Context::event_mouse_click_handler(const Smach::event& x) if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT) { + if (!point2_duck) return Smach::RESULT_OK; point2_duck->set_point(point_holder-get_work_area()->snap_point_to_grid(event.pos)); get_work_area()->queue_draw(); return Smach::RESULT_ACCEPT; diff --git a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp index e92a92b..688b7e6 100644 --- a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp @@ -493,6 +493,7 @@ StateGradient_Context::event_mouse_click_handler(const Smach::event& x) if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT) { + if (!point2_duck) return Smach::RESULT_OK; point2_duck->set_point(get_work_area()->snap_point_to_grid(event.pos)); get_work_area()->queue_draw(); return Smach::RESULT_ACCEPT; diff --git a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp index c1fcc59..8959429 100644 --- a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp @@ -829,6 +829,7 @@ StateRectangle_Context::event_mouse_click_handler(const Smach::event& x) if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT) { + if (!point2_duck) return Smach::RESULT_OK; point2_duck->set_point(get_work_area()->snap_point_to_grid(event.pos)); get_work_area()->queue_draw(); return Smach::RESULT_ACCEPT; diff --git a/synfig-studio/trunk/src/gtkmm/state_star.cpp b/synfig-studio/trunk/src/gtkmm/state_star.cpp index 5fe9440..df75ec9 100644 --- a/synfig-studio/trunk/src/gtkmm/state_star.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_star.cpp @@ -960,6 +960,7 @@ StateStar_Context::event_mouse_click_handler(const Smach::event& x) if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT) { + if (!point2_duck) return Smach::RESULT_OK; point2_duck->set_point(point_holder-get_work_area()->snap_point_to_grid(event.pos)); get_work_area()->queue_draw(); return Smach::RESULT_ACCEPT;