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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-20 16:33:27 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-20 16:47:46 +0400
commit97409c93fa348d0d6e580e0c7819e8f2e690375c (patch)
treee51ee59176d54ad57bfc391a54a5f5b6887ac4d3 /source/blender/blenkernel/intern/library.c
parentf77207b1c384ecb693b8f24fc07c22862d65d909 (diff)
Fix error making datablock with fake user local, the user count would be wrong afterwards.
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index f831378ca5a..083a9043246 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1349,6 +1349,11 @@ void id_clear_lib_data(Main *bmain, ID *id)
BKE_id_lib_local_paths(bmain, id->lib, id);
+ if (id->flag & LIB_FAKEUSER) {
+ id->us--;
+ id->flag &= ~LIB_FAKEUSER;
+ }
+
id->lib = NULL;
id->flag = LIB_LOCAL;
new_id(which_libbase(bmain, GS(id->name)), id, NULL);