Hi,

This patch fixes the crash for me. value_node was being shadowed, and
the inner scope variable was being used to initialize itself.

Is this the proper place to send patches?

Douglas Lau
Index: src/synfigapp/actions/keyframeremove.cpp
===================================================================
--- src/synfigapp/actions/keyframeremove.cpp	(revision 229)
+++ src/synfigapp/actions/keyframeremove.cpp	(working copy)
@@ -142,15 +142,15 @@
 		// If we are a dynamic list, then we need to update the ActivePoints
 		if(ValueNode_DynamicList::Handle::cast_dynamic(value_node))
 		{
-			ValueNode_DynamicList::Handle value_node(ValueNode_DynamicList::Handle::cast_dynamic(value_node));
+			ValueNode_DynamicList::Handle value_node_d(ValueNode_DynamicList::Handle::cast_dynamic(value_node));
 			int i;
-			for(i=0;i<value_node->link_count();i++)
+			for(i=0;i<value_node_d->link_count();i++)
 			try
 			{
 				Activepoint activepoint;
-				activepoint=*value_node->list[i].find(time);
+				activepoint=*value_node_d->list[i].find(time);
 
-				synfigapp::ValueDesc value_desc(value_node,i);
+				synfigapp::ValueDesc value_desc(value_node_d,i);
 
 				Action::Handle action(ActivepointRemove::create());
 				
@@ -172,16 +172,16 @@
 		else if(ValueNode_Animated::Handle::cast_dynamic(value_node))
 		try
 		{
-			ValueNode_Animated::Handle value_node(ValueNode_Animated::Handle::cast_dynamic(value_node));
+			ValueNode_Animated::Handle value_node_a(ValueNode_Animated::Handle::cast_dynamic(value_node));
 			Waypoint waypoint;
-			waypoint=*value_node->find(time);
+			waypoint=*value_node_a->find(time);
 			assert(waypoint.get_time()==time);
 			
 			Action::Handle action(WaypointRemove::create());
 			
 			action->set_param("canvas",get_canvas());
 			action->set_param("canvas_interface",get_canvas_interface());
-			action->set_param("value_node",ValueNode::Handle(value_node));
+			action->set_param("value_node",ValueNode::Handle(value_node_a));
 			action->set_param("waypoint",waypoint);
 	
 			assert(action->is_ready());
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to