Depsgraph: Add assert to make sure the view layer is part of the scene

Which is not in some cases since workspace is still partly implemented.
This commit is contained in:
Dalai Felinto 2017-11-30 13:44:09 -02:00
parent f3de312b83
commit 58c743f7cc
Notes: blender-bot 2023-02-14 09:34:18 +01:00
Referenced by issue #53432, Crash when switching to a workspace after creating a scene.
1 changed files with 1 additions and 0 deletions

View File

@ -206,6 +206,7 @@ void DEG_graph_build_from_view_layer(Depsgraph *graph,
#endif
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
BLI_assert(BLI_findindex(&scene->view_layers, view_layer) != -1);
/* TODO(sergey): This is a bit tricky, but ensures that all the data
* is evaluated properly when depsgraph is becoming "visible".