Fix T63816: Crash opening file with multiple view layers
Dependency graph will not be crated for view layers which were never visible.
This commit is contained in:
@@ -986,6 +986,9 @@ void DRW_cache_free_old_batches(Main *bmain)
|
||||
for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
|
||||
for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
|
||||
Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, false);
|
||||
if (depsgraph == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* TODO(fclem): This is not optimal since it iter over all dupli instances.
|
||||
* In this case only the source object should be tagged. */
|
||||
|
||||
Reference in New Issue
Block a user