Fix: invalid memory access in Hydra world and material export
This commit is contained in:
@@ -72,10 +72,10 @@ void WorldData::init()
|
||||
if (!input_socket) {
|
||||
return;
|
||||
}
|
||||
bNodeLink const *link = input_socket->directly_linked_links()[0];
|
||||
if (input_socket->directly_linked_links().is_empty()) {
|
||||
return;
|
||||
}
|
||||
bNodeLink const *link = input_socket->directly_linked_links()[0];
|
||||
|
||||
bNode *input_node = link->fromnode;
|
||||
if (input_node->type != SH_NODE_BACKGROUND) {
|
||||
|
||||
@@ -60,7 +60,7 @@ MaterialX::DocumentPtr export_to_materialx(Depsgraph *depsgraph,
|
||||
if (material->use_nodes) {
|
||||
material->nodetree->ensure_topology_cache();
|
||||
bNode *output_node = ntreeShaderOutputNode(material->nodetree, SHD_OUTPUT_ALL);
|
||||
if (output_node) {
|
||||
if (output_node && output_node->typeinfo->materialx_fn) {
|
||||
NodeParserData data = {doc.get(),
|
||||
depsgraph,
|
||||
material,
|
||||
|
||||
Reference in New Issue
Block a user