X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_composite.cpp;h=0acc79c6f10a888e4a7cdc7850a642b04393bd84;hb=c6b0c050710376d3cf99b7c083a7c47f1a0516c9;hp=b1921dbc7b79d17d22bff5fc620798dad139334a;hpb=b37086823c5bfee9c76f6b265584a414100963ef;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_composite.cpp b/synfig-core/trunk/src/synfig/valuenode_composite.cpp index b1921db..0acc79c 100644 --- a/synfig-core/trunk/src/synfig/valuenode_composite.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_composite.cpp @@ -184,8 +184,7 @@ ValueNode_Composite::link_count()const bool ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x) { - assert(i>=0); - assert(i<6); + assert(i>=0 && iget_type()==ValueBase(Real()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) { components[i]=x; @@ -205,7 +203,6 @@ ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x) break; case ValueBase::TYPE_COLOR: - assert(i<4); if(x->get_type()==ValueBase(Real()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) { components[i]=x; @@ -214,7 +211,6 @@ ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x) break; case ValueBase::TYPE_SEGMENT: - assert(i<4); if(x->get_type()==ValueBase(Point()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) { components[i]=x; @@ -223,7 +219,6 @@ ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x) break; case ValueBase::TYPE_BLINEPOINT: - assert(i<6); if((i==0 || i==4 || i==5) && x->get_type()==ValueBase(Point()).get_type()) { components[i]=x; @@ -250,14 +245,16 @@ ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x) ValueNode::LooseHandle ValueNode_Composite::get_link_vfunc(int i)const { - assert(i>=0 && i<6); + assert(i>=0 && i=0 && i<6); + assert(i>=0 && i=0 && i<5); + assert(i>=0 && i