Fix #29689, #29702: cycles render crash with node setups with non-cycles nodes,

after group socket refactoring.
This commit is contained in:
Brecht Van Lommel 2011-12-28 19:42:08 +00:00
parent fe2131367b
commit c9830549ea

@ -597,10 +597,14 @@ static void add_nodes(BL::BlendData b_data, ShaderGraph *graph, BL::ShaderNodeTr
else
to_pair = sockets_map[b_to_sock.ptr.data];
ShaderOutput *output = from_pair.first->output(from_pair.second.c_str());
ShaderInput *input = to_pair.first->input(to_pair.second.c_str());
/* either node may be NULL when the node was not exported, typically
because the node type is not supported */
if(from_pair.first && to_pair.first) {
ShaderOutput *output = from_pair.first->output(from_pair.second.c_str());
ShaderInput *input = to_pair.first->input(to_pair.second.c_str());
graph->connect(output, input);
graph->connect(output, input);
}
}
}