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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-11-19 14:18:32 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-11-19 14:18:32 +0300
commitfa6a62fac2a394e66e779c0dc4aef0f9d840ab87 (patch)
treeb57ff35780157f27310b9703950e5e9a4f03716e /source/blender/nodes/intern/node_common.c
parentbd6a9fd7341f5573451abe5924df94a06f9f168b (diff)
Fix NodeGroup generic verify function crashing if node's ID pointer is NULL.
Another nice crasher - in this case, we just want to nuke all sockets... Related to T49991.
Diffstat (limited to 'source/blender/nodes/intern/node_common.c')
-rw-r--r--source/blender/nodes/intern/node_common.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index fbc036435f0..736f17f1d70 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -178,9 +178,14 @@ void node_group_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *i
{
/* check inputs and outputs, and remove or insert them */
if (id == node->id) {
- bNodeTree *ngroup = (bNodeTree *)node->id;
- group_verify_socket_list(ntree, node, &ngroup->inputs, &node->inputs, SOCK_IN);
- group_verify_socket_list(ntree, node, &ngroup->outputs, &node->outputs, SOCK_OUT);
+ if (id == NULL) {
+ nodeRemoveAllSockets(ntree, node);
+ }
+ else {
+ bNodeTree *ngroup = (bNodeTree *)node->id;
+ group_verify_socket_list(ntree, node, &ngroup->inputs, &node->inputs, SOCK_IN);
+ group_verify_socket_list(ntree, node, &ngroup->outputs, &node->outputs, SOCK_OUT);
+ }
}
}