Fix #147083: Playing then pausing causes instant crash

Ensure that function which requires evaluated depsgraph does get
such a depsgraph.

The BKE_scene_ensure_depsgraph() is not guaranteed to give evaluated
depsgraph, it only ensures that the depsgraph exists for the given
combination of bmain, scene, and view layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/147111
This commit is contained in:
Sergey Sharybin
2025-10-01 15:30:28 +02:00
committed by Sergey Sharybin
parent 63d77f028f
commit 152107590e

View File

@@ -5988,6 +5988,9 @@ wmOperatorStatus ED_screen_animation_play(bContext *C, int sync, int mode)
CTX_data_view_layer(C);
Depsgraph *depsgraph = is_sequencer ? BKE_scene_ensure_depsgraph(bmain, scene, view_layer) :
CTX_data_ensure_evaluated_depsgraph(C);
if (is_sequencer) {
BKE_scene_graph_evaluated_ensure(depsgraph, bmain);
}
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
if (ED_screen_animation_playing(CTX_wm_manager(C))) {