[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49631] trunk/blender/source/blender/ compositor/intern/COM_ExecutionSystemHelper.cpp: Tile fix: Use the validity flag in node links directly instead of the indirect node level check for cyclic links to avoid crash in cases of invalid links , which can be created in some situations (reroute nodes).

Lukas Toenne lukas.toenne at googlemail.com
Mon Aug 6 21:11:59 CEST 2012


Revision: 49631
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49631
Author:   lukastoenne
Date:     2012-08-06 19:11:59 +0000 (Mon, 06 Aug 2012)
Log Message:
-----------
Tile fix: Use the validity flag in node links directly instead of the indirect node level check for cyclic links to avoid crash in cases of invalid links, which can be created in some situations (reroute nodes). The link flag may have been set by additional constraints. It is much simpler to use and avoids the redundant check.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp

Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp	2012-08-06 18:49:28 UTC (rev 49630)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp	2012-08-06 19:11:59 UTC (rev 49631)
@@ -154,12 +154,9 @@
 }
 SocketConnection *ExecutionSystemHelper::addNodeLink(NodeRange &node_range, vector<SocketConnection *>& links, bNodeLink *b_nodelink)
 {
-	/// @note: cyclic lines will be ignored. This has been copied from node.c
-	if (b_nodelink->tonode != 0 && b_nodelink->fromnode != 0) {
-		if (!(b_nodelink->fromnode->level >= b_nodelink->tonode->level && b_nodelink->tonode->level != 0xFFF)) { // only add non cyclic lines! so execution will procede
-			return NULL;
-		}
-	}
+	/// @note: ignore invalid links
+	if (!(b_nodelink->flag & NODE_LINK_VALID))
+		return NULL;
 
 	InputSocket *inputSocket = find_input(node_range, b_nodelink->tonode, b_nodelink->tosock);
 	OutputSocket *outputSocket = find_output(node_range, b_nodelink->fromnode, b_nodelink->fromsock);




More information about the Bf-blender-cvs mailing list