diff --git a/source/blender/compositor/nodes/COM_GroupNode.cpp b/source/blender/compositor/nodes/COM_GroupNode.cpp index e5255b6bb87..43dcb7be87f 100644 --- a/source/blender/compositor/nodes/COM_GroupNode.cpp +++ b/source/blender/compositor/nodes/COM_GroupNode.cpp @@ -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 &inputsockets = this->getInputSockets(); vector &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); }