[Bf-blender-cvs] [4dd406c] master: Fix T47482: Own mistake in new handling of 'userone' ID usages when decrementing usercount.
Bastien Montagne
noreply at git.blender.org
Sat Feb 20 16:49:59 CET 2016
Commit: 4dd406c7b7bb26742a3d13f950b28c9b071766a9
Author: Bastien Montagne
Date: Sat Feb 20 16:47:43 2016 +0100
Branches: master
https://developer.blender.org/rB4dd406c7b7bb26742a3d13f950b28c9b071766a9
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.
===================================================================
M source/blender/blenkernel/intern/library.c
===================================================================
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 811fbf5..c06f776 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);
+ }
}
}
More information about the Bf-blender-cvs
mailing list