Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-06-20 18:57:39 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-06-20 18:57:39 +0400
commit14e4630afc7dd1ca190bd10dcfad9c83dac0b78d (patch)
tree19ae1416c4c13f2620be550055cac5bd0c63d73e /source/blender/compositor/nodes
parente3e75b393600954796127f229d3b3c35dddc9d7c (diff)
Fix crash in compositing nodes with a node group with missing datablock, can
happen with library linking and missing files.
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r--source/blender/compositor/nodes/COM_GroupNode.cpp6
1 files changed, 5 insertions, 1 deletions
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<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);
}