From: Carlos Lopez Date: Wed, 13 Oct 2010 18:53:41 +0000 (+0200) Subject: Don't assume the value description is a linkable value node. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d213f589ba8ec1a67f96dc0847e140cacb3fc020;p=synfig.git Don't assume the value description is a linkable value node. Doing that produced assert(0) when linking regular layer parameters. Fixed with this commit. --- diff --git a/synfig-studio/src/synfigapp/actions/valuedesclink.cpp b/synfig-studio/src/synfigapp/actions/valuedesclink.cpp index 6afde69..a9959c1 100644 --- a/synfig-studio/src/synfigapp/actions/valuedesclink.cpp +++ b/synfig-studio/src/synfigapp/actions/valuedesclink.cpp @@ -316,7 +316,9 @@ Action::ValueDescLink::prepare() std::list::iterator iter; // Gets the scalar value of the current value node - Real current_scalar(value_desc_list.begin()->get_scalar()); + Real current_scalar(0); + if(value_desc_list.begin()->parent_is_linkable_value_node()) + current_scalar=value_desc_list.begin()->get_scalar(); bool found_inverse(false); // Check if we are dealing the case of linking differnt types of tangents for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter)