Fix #30028: VSE Paste Strip Crash

Crash was caused by attempting to create strip text from a missed sound datablock.
Actual error happened when this sound datablock was missed, but crash isn't nice
anyway and there were no way to repair scene.
This commit is contained in:
Sergey Sharybin
2012-02-01 08:35:16 +00:00
parent 3866712248
commit ed0d2b5e92

View File

@@ -553,7 +553,10 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
else if (seq->type == SEQ_SOUND) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->sound->name);
if(seq->sound)
BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->sound->name);
else
BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
else if (seq->type == SEQ_MOVIE) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", seq->len, name, seq->strip->dir, seq->strip->stripdata->name);