From: genete Date: Sun, 14 Sep 2008 20:34:26 +0000 (+0000) Subject: Fix bug [ 2096641 ] Thrown exception when all Cpoints are removed in the X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7ceb22004d967afe1742b3105f586349c42118be;p=synfig.git 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 --- 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)