diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-13 18:10:46 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-13 18:10:46 +0300 |
commit | a4e81e2dfbdc63e7db3132f81a02cc5ac4985374 (patch) | |
tree | b4584636c1cb0888f68af426e571193db197c259 /source | |
parent | c6e3a20ab60ba8fb56886913a5c7a4269d45b4c3 (diff) |
Fix T61515: Crash when unloading a scene with pynodes and idprop of type id.
Usual legacy/history crap in NodeTree code... Datablocks's specific
freeing code should never, ever do refcounting management, this is
handled by higher-level code from BKE_library area.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index cd8efa0e1f4..8449c506939 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1020,11 +1020,6 @@ bNode *BKE_node_copy_ex(bNodeTree *ntree, bNode *node_src, const int flag) return node_dst; } -bNode *nodeCopyNode(bNodeTree *ntree, bNode *node) -{ - return BKE_node_copy_ex(ntree, node, LIB_ID_CREATE_NO_USER_REFCOUNT); -} - /* also used via rna api, so we check for proper input output direction */ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock) { @@ -1753,7 +1748,8 @@ static void node_free_node_ex( BLI_freelistN(&node->internal_links); if (node->prop) { - IDP_FreeProperty(node->prop); + /* Remember, no ID user refcount management here! */ + IDP_FreeProperty_ex(node->prop, false); MEM_freeN(node->prop); } |