forked from bartvdbraak/blender
Fix crash in compositing nodes with a node group with missing datablock, can
happen with library linking and missing files.
This commit is contained in:
parent
e3e75b3936
commit
14e4630afc
@ -37,6 +37,7 @@ void GroupNode::convertToOperations(ExecutionSystem *graph, CompositorContext *c
|
||||
void GroupNode::ungroup(ExecutionSystem &system)
|
||||
{
|
||||
bNode *bnode = this->getbNode();
|
||||
bNodeTree *subtree = (bNodeTree *)bnode->id;
|
||||
vector<InputSocket *> &inputsockets = this->getInputSockets();
|
||||
vector<OutputSocket *> &outputsockets = this->getOutputSockets();
|
||||
unsigned int index;
|
||||
@ -44,6 +45,10 @@ void GroupNode::ungroup(ExecutionSystem &system)
|
||||
/* get the node list size _before_ adding proxy nodes, so they are available for linking */
|
||||
int nodes_start = system.getNodes().size();
|
||||
|
||||
/* missing node group datablock can happen with library linking */
|
||||
if(!subtree)
|
||||
return;
|
||||
|
||||
for (index = 0; index < inputsockets.size(); index++) {
|
||||
InputSocket *inputSocket = inputsockets[index];
|
||||
bNodeSocket *editorInput = inputSocket->getbNodeSocket();
|
||||
@ -64,6 +69,5 @@ void GroupNode::ungroup(ExecutionSystem &system)
|
||||
}
|
||||
}
|
||||
|
||||
bNodeTree *subtree = (bNodeTree *)bnode->id;
|
||||
ExecutionSystemHelper::addbNodeTree(system, nodes_start, subtree, bnode);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user