[Bf-blender-cvs] [44c33cc96b8] undo-experiments-swap-reread-datablocks: undoexp: Fix crash due to stupid mistake in recent merges' updates.

Bastien Montagne noreply at git.blender.org
Tue Feb 11 18:03:45 CET 2020


Commit: 44c33cc96b8b92c506182acd226b626f0bda4327
Author: Bastien Montagne
Date:   Tue Feb 11 11:05:41 2020 +0100
Branches: undo-experiments-swap-reread-datablocks
https://developer.blender.org/rB44c33cc96b8b92c506182acd226b626f0bda4327

undoexp: Fix crash due to stupid mistake in recent merges' updates.

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index fde83db0886..404942fe139 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2747,7 +2747,9 @@ static void direct_link_id_private_id(FileData *fd, ID *id, ID *id_old)
     Scene *scene = (Scene *)id;
     if (scene->master_collection != NULL) {
       scene->master_collection = newdataadr(fd, scene->master_collection);
-      direct_link_id(fd, &scene->master_collection->id, &((Scene *)id_old)->master_collection->id);
+      direct_link_id(fd,
+                     &scene->master_collection->id,
+                     id_old != NULL ? &((Scene *)id_old)->master_collection->id : NULL);
       direct_link_collection(fd, scene->master_collection);
     }
   }



More information about the Bf-blender-cvs mailing list