Fix #105968: Crash when delete linked object in scenes Outliner #118458

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:105968 into blender-v4.1-release 2024-02-19 15:18:27 +01:00

1 Commits

Author SHA1 Message Date
Philipp Oeser 51a4febbb9 Fix #105968: Crash when delete linked object in scenes Outliner
Problem here is that when selecting/activating an object in a different
scene in the Outliner, the Outliner will automatically switch scenes via
`WM_window_set_active_scene` however the `view_layer` was untouched and
as a consequence `BKE_view_layer_synced_ensure` gets the right scene but
the "wrong" viewlayer [which makes it not do its thing properly]

To solve, now use the new active viewlayer after having switched scenes.

NOTE this also solves a couple of other asserts elsewhere (when not
deleting, just selecting/activating could assert on
`DEG_is_evaluated_object(ob)`)
2024-02-19 14:10:33 +01:00