[Bf-blender-cvs] [2f7279a413b] master: Fix T60204: Crash when opening a File

Sergey Sharybin noreply at git.blender.org
Fri Jan 25 15:20:45 CET 2019


Commit: 2f7279a413bfb17a63153fb812163dba3cc8ab3d
Author: Sergey Sharybin
Date:   Fri Jan 25 15:18:32 2019 +0100
Branches: master
https://developer.blender.org/rB2f7279a413bfb17a63153fb812163dba3cc8ab3d

Fix T60204: Crash when opening a File

Missing code from 3d083f37. Need to ensure that ID properties
are properly allocated and restored on read.

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3dfb262414b..71addb526be 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6501,9 +6501,9 @@ static void direct_link_scene(FileData *fd, Scene *sce)
 
 	if (sce->master_collection) {
 		sce->master_collection = newdataadr(fd, sce->master_collection);
-		direct_link_collection(fd, sce->master_collection);
 		/* Needed because this is an ID outside of Main. */
-		sce->master_collection->id.py_instance = NULL;
+		direct_link_id(fd, &sce->master_collection->id);
+		direct_link_collection(fd, sce->master_collection);
 	}
 
 	/* insert into global old-new map for reading without UI (link_global accesses it again) */



More information about the Bf-blender-cvs mailing list