Cleanup: skip accessing sequence strip name/source when hidden

This commit is contained in:
Campbell Barton 2021-01-11 17:58:08 +11:00
parent a83c67c183
commit 64929398fb
Notes: blender-bot 2023-02-14 09:19:09 +01:00
Referenced by issue #84556, Blend file crashed and won't open
1 changed files with 9 additions and 9 deletions

View File

@ -683,23 +683,23 @@ static size_t draw_seq_text_get_overlay_string(SpaceSeq *sseq,
char *r_overlay_string,
size_t overlay_string_len)
{
const char *name = draw_seq_text_get_name(seq);
char source[FILE_MAX];
draw_seq_text_get_source(seq, source, sizeof(source));
const char *text_sep = " | ";
const char *text_array[5];
int i = 0;
if (sseq->flag & SEQ_SHOW_STRIP_NAME) {
text_array[i++] = name;
text_array[i++] = draw_seq_text_get_name(seq);
}
if ((sseq->flag & SEQ_SHOW_STRIP_SOURCE) && (source[0] != '\0')) {
if (i != 0) {
text_array[i++] = text_sep;
char source[FILE_MAX];
if (sseq->flag & SEQ_SHOW_STRIP_SOURCE) {
draw_seq_text_get_source(seq, source, sizeof(source));
if (source[0] != '\0') {
if (i != 0) {
text_array[i++] = text_sep;
}
text_array[i++] = source;
}
text_array[i++] = source;
}
char strip_duration_text[16];