diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-20 16:33:27 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-20 16:47:46 +0400 |
commit | 97409c93fa348d0d6e580e0c7819e8f2e690375c (patch) | |
tree | e51ee59176d54ad57bfc391a54a5f5b6887ac4d3 /source/blender | |
parent | f77207b1c384ecb693b8f24fc07c22862d65d909 (diff) |
Fix error making datablock with fake user local, the user count would be wrong afterwards.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 5 |
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); |