Fix bug [ 2096641 ] Thrown exception when all Cpoints are removed in the
authorgenete <genete@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 14 Sep 2008 20:34:26 +0000 (20:34 +0000)
committergenete <genete@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 14 Sep 2008 20:34:26 +0000 (20:34 +0000)
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

index f5ac42f..596feda 100644 (file)
@@ -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)