Fix: Crash when scene has F-Curves for VSE sequencer strips, but no VSE

Fix a crash when the Scene's Action has F-Curves targeting the VSE
sequencer strips, but the scene has no VSE data at all.

This issue occurs in the following way:

- Scene uses VSE, with an animated strip.
- Duplicate the scene using Linked Copy. This does _not_ copy the VSE
  into the duplicate scene, but does include its animation (due to a bug
  for which a fix is coming).
- Ensure the Dope Sheet is visible & showing the scene animation.

Pull Request: https://projects.blender.org/blender/blender/pulls/135576
This commit is contained in:
Sybren A. Stüvel
2025-03-06 14:06:45 +01:00
parent c52da69dfb
commit 216964c697
@@ -192,6 +192,11 @@ static void animchan_sync_fcurve_scene(bAnimListElem *ale)
/* Check if this strip is selected. */
Editing *ed = SEQ_editing_get(scene);
if (ed == nullptr) {
/* The existence of the F-Curve doesn't imply the existence of the sequencer
* strip, or even the sequencer itself. */
return;
}
strip = SEQ_get_sequence_by_name(ed->seqbasep, strip_name, false);
if (strip == nullptr) {
return;