From: dooglus Date: Wed, 20 Feb 2008 15:30:19 +0000 (+0000) Subject: Turning the first point in a polygon 'off' was causing a crash. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c262dc6238e787c97aa7422fc907d0c1a5158965;p=synfig.git Turning the first point in a polygon 'off' was causing a crash. git-svn-id: http://svn.voria.com/code@1786 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp index 15ee0c9..084f642 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp @@ -1695,6 +1695,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleget_contained_type()==ValueBase::TYPE_VECTOR) { Bezier bezier; + int first = -1; for(i=0;ilink_count();i++) { if(!value_node->list[i].status_at_time(get_time())) @@ -1703,6 +1704,10 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle duck(last_duck()); + // remember the index of the first vertex we didn't skip + if (first == -1) + first = i; + if(param_desc) { synfigapp::ValueDesc value_desc_origin(value_desc.get_layer(),param_desc->get_origin()); @@ -1720,7 +1725,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle0) + if (first != i) { handle bezier_(new Bezier()); bezier_->p1=bezier.p1;