From 7ceb22004d967afe1742b3105f586349c42118be Mon Sep 17 00:00:00 2001 From: genete Date: Sun, 14 Sep 2008 20:34:26 +0000 Subject: [PATCH] Fix bug [ 2096641 ] Thrown exception when all Cpoints are removed in the gradient editor git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2056 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/widget_gradient.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/synfig-studio/trunk/src/gtkmm/widget_gradient.cpp b/synfig-studio/trunk/src/gtkmm/widget_gradient.cpp index f5ac42f..596feda 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_gradient.cpp @@ -295,6 +295,7 @@ Widget_Gradient::on_event(GdkEvent *event) case GDK_MOTION_NOTIFY: if(editable_ && y>get_height()-CONTROL_HEIGHT) { + if(!gradient_.size()) return true; Gradient::iterator iter(gradient_.find(selected_cpoint)); if(event->button.state&GDK_SHIFT_MASK) -- 2.7.4