Fix T91694: VSE crashes when creating new scene
Crash happened due to NULL dereference. Add NULL checks.
This commit is contained in:
parent
ad3e5d2bf5
commit
d2dda0e8b9
Notes:
blender-bot
2023-02-14 03:03:03 +01:00
Referenced by issue #91694, Crash when switching to video editing workspace in new scene
|
@ -2719,7 +2719,7 @@ void sequencer_draw_preview(const bContext *C,
|
|||
sequencer_draw_borders_overlay(sseq, v2d, scene);
|
||||
}
|
||||
|
||||
if (!draw_backdrop) {
|
||||
if (!draw_backdrop && scene->ed != NULL) {
|
||||
SeqCollection *collection = SEQ_query_rendered_strips(&scene->ed->seqbase, timeline_frame, 0);
|
||||
Sequence *seq;
|
||||
SEQ_ITERATOR_FOREACH (seq, collection) {
|
||||
|
|
|
@ -113,12 +113,17 @@ static void freeSeqData(TransInfo *UNUSED(t),
|
|||
void createTransSeqImageData(TransInfo *t)
|
||||
{
|
||||
Editing *ed = SEQ_editing_get(t->scene);
|
||||
|
||||
if (ed == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
ListBase *seqbase = SEQ_active_seqbase_get(ed);
|
||||
SeqCollection *strips = SEQ_query_rendered_strips(seqbase, t->scene->r.cfra, 0);
|
||||
SEQ_filter_selected_strips(strips);
|
||||
|
||||
const int count = SEQ_collection_len(strips);
|
||||
if (ed == NULL || count == 0) {
|
||||
if (count == 0) {
|
||||
SEQ_collection_free(strips);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue