Fix T99266: Crash when dragging file to VSE from file browser

Crash happened because sequencer data was not initialized. Ensure data
is initialized before adding strip.
This commit is contained in:
Richard Antalik 2022-06-30 15:56:08 +02:00 committed by Thomas Dinges
parent 6b15369e24
commit b6c668a13d
Notes: blender-bot 2023-02-14 06:42:53 +01:00
Referenced by issue #99266, Regression: Blender Crashes when adding new video to new scene in VSE
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 3 additions and 4 deletions

View File

@ -231,10 +231,9 @@ static void update_overlay_strip_poistion_data(bContext *C, const int mval[2])
else {
/* Check if there is a strip that would intersect with the new strip(s). */
coords->is_intersecting = false;
Sequence dummy_seq = {.machine = coords->channel,
.startdisp = coords->start_frame,
.enddisp = coords->start_frame + coords->strip_len};
Editing *ed = SEQ_editing_get(scene);
Sequence dummy_seq = {
.machine = coords->channel, .start = coords->start_frame, .len = coords->strip_len};
Editing *ed = SEQ_editing_ensure(scene);
for (int i = 0; i < coords->channel_len && !coords->is_intersecting; i++) {
coords->is_intersecting = SEQ_transform_test_overlap(ed->seqbasep, &dummy_seq);