diff options
author | Bastien Montagne <bastien@blender.org> | 2022-04-29 17:33:48 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-04-29 18:57:46 +0300 |
commit | d779b154853afba9cb2a30826c2c7f30237153e3 (patch) | |
tree | 5b7fd7cd64881ff808dafea319b6a1febeee67e0 /source/blender/blenkernel/intern/lib_remap.c | |
parent | f44a34fc55ba367e201d13cf0a1eddfe13199f8a (diff) |
Fix (unreported) bad handling of ID usercount increment in remapping code.
While this only had minor potential effect, both code incrementing
usercount of newly remapped IDs were wrong.
Original one would by-pass any 'ensured user' handling, newer one would
systematically make the ID directly linked...
`id_us_plus_no_lib` is to be used here.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_remap.c')
-rw-r--r-- | source/blender/blenkernel/intern/lib_remap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c index 2b449ad50bb..3f40c9d2088 100644 --- a/source/blender/blenkernel/intern/lib_remap.c +++ b/source/blender/blenkernel/intern/lib_remap.c @@ -131,8 +131,8 @@ static void foreach_libblock_remap_callback_apply(ID *id_owner, id_us_min(old_id); } if (new_id != NULL && (force_user_refcount || (new_id->tag & LIB_TAG_NO_MAIN) == 0)) { - /* We do not want to handle LIB_TAG_INDIRECT/LIB_TAG_EXTERN here. */ - new_id->us++; + /* Do not handle LIB_TAG_INDIRECT/LIB_TAG_EXTERN here. */ + id_us_plus_no_lib(new_id); } } else if (cb_flag & IDWALK_CB_USER_ONE) { |