[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59983] trunk/blender/source/blender/nodes /texture/nodes/node_texture_common.c: fix/workaround [#36694] Texture node groups tend to crash Blender a lot.

Campbell Barton ideasman42 at gmail.com
Tue Sep 10 05:18:44 CEST 2013


Revision: 59983
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59983
Author:   campbellbarton
Date:     2013-09-10 03:18:43 +0000 (Tue, 10 Sep 2013)
Log Message:
-----------
fix/workaround [#36694] Texture node groups tend to crash Blender a lot.

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/texture/nodes/node_texture_common.c

Modified: trunk/blender/source/blender/nodes/texture/nodes/node_texture_common.c
===================================================================
--- trunk/blender/source/blender/nodes/texture/nodes/node_texture_common.c	2013-09-10 02:49:33 UTC (rev 59982)
+++ trunk/blender/source/blender/nodes/texture/nodes/node_texture_common.c	2013-09-10 03:18:43 UTC (rev 59983)
@@ -93,9 +93,12 @@
 	for (node = ngroup->nodes.first; node; node = node->next) {
 		if (node->type == NODE_GROUP_INPUT) {
 			for (sock = node->outputs.first, a = 0; sock; sock = sock->next, ++a) {
-				ns = node_get_socket_stack(gstack, sock);
-				if (ns)
-					copy_stack(ns, in[a]);
+				if (in[a]) {  /* shouldn't need to check this [#36694] */
+					ns = node_get_socket_stack(gstack, sock);
+					if (ns) {
+						copy_stack(ns, in[a]);
+					}
+				}
 			}
 		}
 	}
@@ -114,9 +117,12 @@
 	for (node = ngroup->nodes.first; node; node = node->next) {
 		if (node->type == NODE_GROUP_OUTPUT && (node->flag & NODE_DO_OUTPUT)) {
 			for (sock = node->inputs.first, a = 0; sock; sock = sock->next, ++a) {
-				ns = node_get_socket_stack(gstack, sock);
-				if (ns)
-					copy_stack(out[a], ns);
+				if (out[a]) {  /* shouldn't need to check this [#36694] */
+					ns = node_get_socket_stack(gstack, sock);
+					if (ns) {
+						copy_stack(out[a], ns);
+					}
+				}
 			}
 			break;  /* only one active output node */
 		}




More information about the Bf-blender-cvs mailing list