diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-04 19:23:28 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-04 19:24:21 +0300 |
commit | 24be453938c49cd45d910a8ad0ee144fddd843ee (patch) | |
tree | 15ed9579d2af0c7adc6af5da46be2e213c2acde2 /source/blender/blenloader | |
parent | 50f17db6410b4947340d707ceb3112c97b2db658 (diff) |
Fix (unreported) bad LI_ID usercount when linking a new lib.
Library datablocks shall have a zero user count in Blender currently...
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 8851edf4e35..9bc0e241722 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -622,6 +622,7 @@ static Main *blo_find_main(FileData *fd, const char *filepath, const char *relab /* Add library datablock itself to 'main' Main, since libraries are **never** linked data. * Fixes bug where you could end with all ID_LI datablocks having the same name... */ lib = BKE_libblock_alloc(mainlist->first, ID_LI, "Lib"); + lib->id.us = ID_FAKE_USERS(lib); /* Important, consistency with main ID reading code from read_libblock(). */ BLI_strncpy(lib->name, filepath, sizeof(lib->name)); BLI_strncpy(lib->filepath, name1, sizeof(lib->filepath)); |