diff options
author | Bastien Montagne <bastien@blender.org> | 2020-04-16 18:05:58 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-04-16 18:08:46 +0300 |
commit | e9bf624a498a4f0074374740737d47c5df7fd87d (patch) | |
tree | 348138a0c194ff66f7dd19f8f1fc4143fc4efde5 /source/blender/editors/space_node/space_node.c | |
parent | 2a68b41b7df18299952f83f4499fa132c7141a1e (diff) |
Fix T75680: Nodegroup user count increased when file saved in edit group mode.
This editor's code was a bit schizophrenic, some parts considering its
nodetree usages as real refcounted ones, others, as shallow 'user one'
ones...
Editors should not be real ID users anyway, unless there are *very* good
reasons for it, so swich it to fully 'shallow' usage now.
Diffstat (limited to 'source/blender/editors/space_node/space_node.c')
-rw-r--r-- | source/blender/editors/space_node/space_node.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index d682cab7293..b6ee393b991 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -890,8 +890,7 @@ static void node_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, I for (path = snode->treepath.first; path; path = path->next) { if ((ID *)path->nodetree == old_id) { path->nodetree = (bNodeTree *)new_id; - id_us_min(old_id); - id_us_plus(new_id); + id_us_ensure_real(new_id); } if (path == snode->treepath.first) { /* first nodetree in path is same as snode->nodetree */ |