Fix regression: Crash garbage collecting VBOs on never evaluated scenes

Introduced in rB087777f2b9b8.

Fixes issues with scene from T82808.
This commit is contained in:
Clément Foucault
2021-02-01 09:55:06 +01:00
parent a9b53daf23
commit 30ac21bf33

View File

@@ -3440,6 +3440,10 @@ Depsgraph *BKE_scene_get_depsgraph(const Scene *scene, const ViewLayer *view_lay
{
BLI_assert(BKE_scene_has_view_layer(scene, view_layer));
if (scene->depsgraph_hash == NULL) {
return NULL;
}
DepsgraphKey key;
key.view_layer = view_layer;
return BLI_ghash_lookup(scene->depsgraph_hash, &key);