Fix T87010: VSE: adding strips crashes in certain files

Caused by {rB571362642201} where versioning code for new sequencer tool
settings was only done for scenes already having sequencer scene->ed.

If scene->ed was not present, sequencer tool settings were never
initalized for this scene [if the VSE was then used later], leading to
crashes in some places.

Now just use the versioning code to initalize sequencer tool settings
for all scenes not having them yet.

Maniphest Tasks: T87010

Differential Revision: https://developer.blender.org/D10996
This commit is contained in:
Philipp Oeser 2021-04-16 16:41:48 +02:00
parent 0bf630493f
commit 0f81dafe6c
Notes: blender-bot 2023-02-14 05:16:25 +01:00
Referenced by issue #88551, Blender crahses when I add an Image/Sequence in the VSE
Referenced by issue #87925, Loading a video file in the video sequencer in my custom startup file crashes Blender 2.92.0
Referenced by issue #87010, VSE: Crash When Trying to add Image Sequence / Movie [if based on file opened from pre 2.8]
1 changed files with 1 additions and 1 deletions

View File

@ -1574,7 +1574,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
if (scene->ed != NULL) {
if (scene->toolsettings->sequencer_tool_settings == NULL) {
scene->toolsettings->sequencer_tool_settings = SEQ_tool_settings_init();
}
}