diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-18 18:24:28 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-18 18:56:17 +0300 |
commit | 30673ff3252864f6d8a1e96a20d8af7e156c5bc7 (patch) | |
tree | e9b76b3f36f90e250712279988c980050f3c85e5 /source/blender/blenloader | |
parent | f9547ab3133654f7dac805f9d61c49183fa2046c (diff) |
Fix crash when collection view layer cannot be found
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 } |