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.
This commit is contained in:
Bastien Montagne 2019-02-13 16:10:46 +01:00
parent c6e3a20ab6
commit a4e81e2dfb
Notes: blender-bot 2023-10-18 15:23:11 +02:00
Referenced by issue #61515, Crash when unloading a scene with pynodes and idprop of type id
1 changed files with 2 additions and 6 deletions

View File

@ -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);
}