diff options
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 5 |
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())); } } |