Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-12 18:47:36 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-12 18:47:36 +0400
commitf97d7b234daaed836172a7caaa5b8d590c7513e5 (patch)
tree97d45c25b0dd011ec231b008264d2b5dd6e7c9a3 /intern/cycles/blender/blender_shader.cpp
parentebc653463ddfd9f8b893b6acbcc6465972e6abc6 (diff)
Cycles: fix crash with group node sockets that don't connect to any node
inside the group.
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r--intern/cycles/blender/blender_shader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 4e19ee82f77..362c765b399 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -519,7 +519,10 @@ static void add_nodes(BL::BlendData b_data, ShaderGraph *graph, BL::ShaderNodeTr
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()));
}
}