Fix T60204: Crash when opening a File

Missing code from 3d083f37. Need to ensure that ID properties
are properly allocated and restored on read.
This commit is contained in:
2019-01-25 15:18:32 +01:00
parent 71e3002824
commit 2f7279a413

View File

@@ -6501,9 +6501,9 @@ static void direct_link_scene(FileData *fd, Scene *sce)
if (sce->master_collection) { if (sce->master_collection) {
sce->master_collection = newdataadr(fd, 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. */ /* 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) */ /* insert into global old-new map for reading without UI (link_global accesses it again) */