[Bf-blender-cvs] [06f0980] id_newid_optional: Fix crash when accessing id->newid in some cases.
Bastien Montagne
noreply at git.blender.org
Wed Nov 30 15:24:57 CET 2016
Commit: 06f09809031a7f65cd0fea231c684be953dfa85c
Author: Bastien Montagne
Date: Wed Nov 30 15:22:43 2016 +0100
Branches: id_newid_optional
https://developer.blender.org/rB06f09809031a7f65cd0fea231c684be953dfa85c
Fix crash when accessing id->newid in some cases.
ID->newid was not cleared on reading file, since until now it could be
saved with whatever random value...
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 98c8a26..f9f8a17 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8102,6 +8102,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short
id->lib = main->curlib;
id->us = ID_FAKE_USERS(id);
id->icon_id = 0;
+ id->newid = NULL;
/* this case cannot be direct_linked: it's just the ID part */
if (bhead->code == ID_ID) {
More information about the Bf-blender-cvs
mailing list