Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2010-12-17 17:20:20 +0300
committerTon Roosendaal <ton@blender.org>2010-12-17 17:20:20 +0300
commite5e039d626656ac430cd750f5761adfa8d94a98a (patch)
treedd0dcef722eb23a89be2476674419c0415d0ee8d /source/blender/makesrna/intern/rna_ID.c
parent12a93c5b0f4c3d2de88161669f2dd655646f222e (diff)
Bugfix #25264
Bad user counting went on, ID users could be set zero whilst having Fake user set. Also ensured the code using the BKE calls for increment/decrement.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 91c6fcdf40a..69342068a57 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -190,11 +190,11 @@ void rna_ID_fake_user_set(PointerRNA *ptr, int value)
if(value && !(id->flag & LIB_FAKEUSER)) {
id->flag |= LIB_FAKEUSER;
- id->us++;
+ id_us_plus(id);
}
else if(!value && (id->flag & LIB_FAKEUSER)) {
id->flag &= ~LIB_FAKEUSER;
- id->us--;
+ id_us_min(id);
}
}
@@ -241,7 +241,7 @@ ID *rna_ID_copy(ID *id)
ID *newid;
if(id_copy(id, &newid, 0)) {
- if(newid) newid->us--;
+ if(newid) id_us_min(newid);
return newid;
}