diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-02-20 18:47:43 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-02-20 18:49:44 +0300 |
commit | 4dd406c7b7bb26742a3d13f950b28c9b071766a9 (patch) | |
tree | 5fdc3199ed0ae622e60461d2670402ec11910e6f | |
parent | c0d43871e01c4dee8ef712bbb1b9a75af9947ae6 (diff) |
Fix T47482: Own mistake in new handling of 'userone' ID usages when decrementing usercount.
Ended up not handling at all 'userone' case, now it increments usercount correctly when needed.
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 811fbf5e5f0..c06f776f6d0 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -209,11 +209,6 @@ void id_us_min(ID *id) if (id) { const int limit = ID_FAKE_USERS(id); - if ((id->us == limit) && (id->tag & LIB_TAG_EXTRAUSER) && !(id->tag & LIB_TAG_EXTRAUSER_SET)) { - /* We need an extra user here, but never actually incremented user count for it so far, do it now. */ - id_us_ensure_real(id); - } - if (id->us <= limit) { printf("ID user decrement error: %s (from '%s'): %d <= %d\n", id->name, id->lib ? id->lib->filepath : "[Main]", id->us, limit); @@ -225,6 +220,11 @@ void id_us_min(ID *id) else { id->us--; } + + if ((id->us == limit) && (id->tag & LIB_TAG_EXTRAUSER)) { + /* We need an extra user here, but never actually incremented user count for it so far, do it now. */ + id_us_ensure_real(id); + } } } |