Revision: 40168
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40168
Author:   blendix
Date:     2011-09-12 14:47:36 +0000 (Mon, 12 Sep 2011)
Log Message:
-----------
Cycles: fix crash with group node sockets that don't connect to any node
inside the group.

Modified Paths:
--------------
    branches/cycles/intern/cycles/blender/blender_shader.cpp

Modified: branches/cycles/intern/cycles/blender/blender_shader.cpp
===================================================================
--- branches/cycles/intern/cycles/blender/blender_shader.cpp    2011-09-12 
14:28:21 UTC (rev 40167)
+++ branches/cycles/intern/cycles/blender/blender_shader.cpp    2011-09-12 
14:47:36 UTC (rev 40168)
@@ -519,7 +519,10 @@
                        to_name = b_to_sock.name();
                }
 
-               graph->connect(from_node->output(from_name.c_str()), 
to_node->input(to_name.c_str()));
+               /* in case of groups there may not actually be a node inside 
the group
+                  that the group socket connects to, so from_node or to_node 
may be NULL */
+               if(from_node && to_node)
+                       graph->connect(from_node->output(from_name.c_str()), 
to_node->input(to_name.c_str()));
        }
 }
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to