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:
authorJoerg Mueller <nexyon@gmail.com>2011-08-23 15:44:24 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-08-23 15:44:24 +0400
commitff8daca1f117b34c92462f4ab3bbe2aa50f95166 (patch)
treea5db63342818deb95c86450ff1a39ffbd7297e6c /source/blender/blenkernel/intern/sound.c
parentf0d5abfcb2b54f6fd7a24220e81e0c88a914d87f (diff)
Bugfix: Removing a sound from a speaker resulted in a crash.
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c10
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);