[Bf-blender-cvs] [fd2bdc0] master: Fix crash loading modifiers with missing IDs

Sergey Sharybin noreply at git.blender.org
Thu Oct 8 18:07:05 CEST 2015


Commit: fd2bdc07ca8e9b8e5f7c1e48058b9bfddbc607a0
Author: Sergey Sharybin
Date:   Thu Oct 8 21:06:09 2015 +0500
Branches: master
https://developer.blender.org/rBfd2bdc07ca8e9b8e5f7c1e48058b9bfddbc607a0

Fix crash loading modifiers with missing IDs

Was very visible with barcelona file from Cycles benchmark repository.

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b8bdbe5..2ce4a93 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4596,7 +4596,7 @@ static void lib_link_modifiers__linkModifiers(
 	FileData *fd = userData;
 
 	*idpoin = newlibadr(fd, ob->id.lib, *idpoin);
-	if (cd_flag & IDWALK_USER) {
+	if (*idpoin != NULL && (cd_flag & IDWALK_USER) != 0) {
 		(*idpoin)->us++;
 	}
 }




More information about the Bf-blender-cvs mailing list