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:
parent
7625fad9e9
commit
5a144c797a
Notes:
blender-bot
2023-02-14 10:48:33 +01:00
Referenced by issue #63863, Dyntopo Sculpt on 3 Objects with Lock Object Modes Off Referenced by issue #63826, Crashing file Referenced by issue #63832, Crash when trying to save and image Referenced by issue #63816, Blender crashes on opening "famous" demo files Referenced by issue #63813, Saving images closes Blender Referenced by issue #63781, Alt-M for merging vertices bail out Referenced by issue #63781, Alt-M for merging vertices bail out
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue