Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-11 18:53:27 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-11 18:53:27 +0400
commit1997cba227138efb1bf9aeb514a2eef15385eef1 (patch)
treee4bb262433be45fc5c660ada22fd80f57375bc0e /source/blender/editors/space_sequencer/sequencer_draw.c
parent79f21f88c2be305962f6432bf8b1af94056fd92b (diff)
Fix crash drawing waveform with zero length sound, found looking into sound reading bug.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 0f5398f24a7..9e402de3b9d 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -187,6 +187,9 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
if(!seq->sound->waveform)
sound_read_waveform(seq->sound);
+ if(!seq->sound->waveform)
+ return; /* zero length sound */
+
waveform = seq->sound->waveform;
startsample = floor((seq->startofs + seq->anim_startofs)/FPS * SOUND_WAVE_SAMPLES_PER_SECOND);