forked from bartvdbraak/blender
fix for crash when node groups loose their ID pointer references (when linked libs don't load)
This commit is contained in:
parent
7aa44d088f
commit
ba5c635502
@ -1030,14 +1030,19 @@ static int material_in_nodetree(bNodeTree *ntree, Material *mat)
|
||||
bNode *node;
|
||||
|
||||
for (node = ntree->nodes.first; node; node = node->next) {
|
||||
if (node->id && GS(node->id->name) == ID_MA) {
|
||||
if (node->id == (ID *)mat)
|
||||
if (node->id) {
|
||||
if (GS(node->id->name) == ID_MA) {
|
||||
if (node->id == (ID *)mat) {
|
||||
return 1;
|
||||
}
|
||||
else if (node->type == NODE_GROUP)
|
||||
if (material_in_nodetree((bNodeTree *)node->id, mat))
|
||||
}
|
||||
else if (node->type == NODE_GROUP) {
|
||||
if (material_in_nodetree((bNodeTree *)node->id, mat)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1815,10 +1815,13 @@ static int node_tree_has_composite_output(bNodeTree *ntree)
|
||||
return TRUE;
|
||||
}
|
||||
else if (node->type == NODE_GROUP) {
|
||||
if (node_tree_has_composite_output((bNodeTree *)node->id))
|
||||
if (node->id) {
|
||||
if (node_tree_has_composite_output((bNodeTree *)node->id)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user