[Bf-blender-cvs] [30673ff3252] blender2.8: Fix crash when collection view layer cannot be found

Sybren A. Stüvel noreply at git.blender.org
Fri May 18 17:57:19 CEST 2018


Commit: 30673ff3252864f6d8a1e96a20d8af7e156c5bc7
Author: Sybren A. Stüvel
Date:   Fri May 18 17:24:28 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB30673ff3252864f6d8a1e96a20d8af7e156c5bc7

Fix crash when collection view layer cannot be found

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 44aa8a40993..35b699f29b8 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5686,7 +5686,9 @@ static void direct_link_collection(FileData *fd, Collection *collection)
 
 	if (collection->view_layer != NULL) {
 		collection->view_layer = newdataadr(fd, collection->view_layer);
-		direct_link_view_layer(fd, collection->view_layer);
+		if (collection->view_layer != NULL) {
+			direct_link_view_layer(fd, collection->view_layer);
+		}
 	}
 #endif
 }



More information about the Bf-blender-cvs mailing list