diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-19 14:16:14 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-19 14:16:14 +0300 |
commit | bd6a9fd7341f5573451abe5924df94a06f9f168b (patch) | |
tree | e6621501fa612a54491299c3acc723e7c6099476 /source/blender/blenkernel/intern | |
parent | 5a6534a5bb62492af2bae8cff0880c3da19ac4d6 (diff) |
Fix (unreported) nodeRemoveAllSockets() not clearing inputs/outputs sockets lists.
Nice crasher (though seems to not be much used so far)!
Related to T49991.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 2b88ae4823c..a227228ceb5 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -736,11 +736,14 @@ void nodeRemoveAllSockets(bNodeTree *ntree, bNode *node) node_socket_free(ntree, sock, node); MEM_freeN(sock); } + BLI_listbase_clear(&node->inputs); + for (sock = node->outputs.first; sock; sock = sock_next) { sock_next = sock->next; node_socket_free(ntree, sock, node); MEM_freeN(sock); } + BLI_listbase_clear(&node->outputs); node->update |= NODE_UPDATE; } |