diff options
author | Peter Fog <tintwotin> | 2021-01-10 19:18:50 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-01-10 19:37:07 +0300 |
commit | 544e37190846cc077981f69a15fccf3aa3a590b5 (patch) | |
tree | eda98ca16045fe29ceec59c0df3561632b0fb3cc | |
parent | e45630a99fc2cd7cfcf3c762ec9af32763a31dc2 (diff) |
Fix T84529: Crash with strip using deleted scene
If scene strip has no scene assigned, leave source string empty.
Same goes for all other strips, that use ID datablocks.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D10058
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index f792f75bf96..863489b09d1 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -627,10 +627,8 @@ static void draw_seq_text_get_source(Sequence *seq, char *r_source, size_t sourc if (ELEM(seq->type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE)) { BLI_snprintf(r_source, source_len, "%s%s", seq->strip->dir, seq->strip->stripdata->name); } - else if (seq->type == SEQ_TYPE_SOUND_RAM) { - if (seq->sound) { - BLI_snprintf(r_source, source_len, "%s", seq->sound->filepath); - } + else if (seq->type == SEQ_TYPE_SOUND_RAM && seq->sound != NULL) { + BLI_snprintf(r_source, source_len, "%s", seq->sound->filepath); } else if (seq->type == SEQ_TYPE_MULTICAM) { BLI_snprintf(r_source, source_len, "Channel: %d", seq->multicam_source); @@ -639,8 +637,8 @@ static void draw_seq_text_get_source(Sequence *seq, char *r_source, size_t sourc TextVars *textdata = seq->effectdata; BLI_snprintf(r_source, source_len, "%s", textdata->text); } - else if (seq->type == SEQ_TYPE_SCENE) { - if (seq->scene_camera) { + else if (seq->type == SEQ_TYPE_SCENE && seq->scene != NULL) { + if (seq->scene_camera && seq->scene_camera != NULL) { BLI_snprintf(r_source, source_len, "%s (%s)", @@ -651,10 +649,10 @@ static void draw_seq_text_get_source(Sequence *seq, char *r_source, size_t sourc BLI_snprintf(r_source, source_len, "%s", seq->scene->id.name + 2); } } - else if (seq->type == SEQ_TYPE_MOVIECLIP) { + else if (seq->type == SEQ_TYPE_MOVIECLIP && seq->clip != NULL) { BLI_snprintf(r_source, source_len, "%s", seq->clip->id.name + 2); } - else if (seq->type == SEQ_TYPE_MASK) { + else if (seq->type == SEQ_TYPE_MASK && seq->mask != NULL) { BLI_snprintf(r_source, source_len, "%s", seq->mask->id.name + 2); } else { |