From 2f7279a413bfb17a63153fb812163dba3cc8ab3d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 25 Jan 2019 15:18:32 +0100 Subject: [PATCH] Fix T60204: Crash when opening a File Missing code from 3d083f37. Need to ensure that ID properties are properly allocated and restored on read. --- source/blender/blenloader/intern/readfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) */