Fix crash when collection view layer cannot be found

This commit is contained in:
Sybren A. Stüvel
2018-05-18 17:24:28 +02:00
parent f9547ab313
commit 30673ff325

View File

@@ -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
}