diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-17 17:20:20 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-17 17:20:20 +0300 |
commit | e5e039d626656ac430cd750f5761adfa8d94a98a (patch) | |
tree | dd0dcef722eb23a89be2476674419c0415d0ee8d /source/blender/makesrna/intern/rna_ID.c | |
parent | 12a93c5b0f4c3d2de88161669f2dd655646f222e (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.c | 6 |
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; } |