diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-08-23 15:44:24 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-08-23 15:44:24 +0400 |
commit | ff8daca1f117b34c92462f4ab3bbe2aa50f95166 (patch) | |
tree | a5db63342818deb95c86450ff1a39ffbd7297e6c /source/blender/blenkernel | |
parent | f0d5abfcb2b54f6fd7a24220e81e0c88a914d87f (diff) |
Bugfix: Removing a sound from a speaker resulted in a crash.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index d7385a86105..a364f860255 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -676,11 +676,17 @@ void sound_update_scene(struct Main* bmain, struct Scene* scene) if(AUD_removeSet(scene->speaker_handles, strip->speaker_handle)) { - AUD_moveSequence(strip->speaker_handle, strip->start / FPS, -1, 0); + if(speaker->sound) + AUD_moveSequence(strip->speaker_handle, strip->start / FPS, -1, 0); + else + { + AUD_removeSequence(scene->sound_scene, strip->speaker_handle); + strip->speaker_handle = NULL; + } } else { - if(speaker && speaker->sound) + if(speaker->sound) { strip->speaker_handle = AUD_addSequence(scene->sound_scene, speaker->sound->playback_handle, strip->start / FPS, -1, 0); AUD_setRelativeSequence(strip->speaker_handle, 0); |