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:
authorJörg Müller <nexyon@gmail.com>2019-06-07 23:29:52 +0300
committerJörg Müller <nexyon@gmail.com>2019-06-07 23:30:21 +0300
commitb236c2a0ce1e73f1b82a88754e53fb049f6046ca (patch)
treea73624a722a4dff09d9de9bb0724c35e0b5f30ac /source/blender/blenkernel/intern/sound.c
parent424566239fe97c268061e8b375029b59a5ea010f (diff)
Fix T65613: Memory leak in Audaspace with 3D sound
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index aba5a0ed516..029fea5c300 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -524,12 +524,18 @@ void BKE_sound_destroy_scene(Scene *scene)
if (scene->sound_scrub_handle) {
AUD_Handle_stop(scene->sound_scrub_handle);
}
- if (scene->sound_scene) {
- AUD_Sequence_free(scene->sound_scene);
- }
if (scene->speaker_handles) {
+ void *handle;
+
+ while ((handle = AUD_getSet(scene->speaker_handles))) {
+ AUD_Sequence_remove(scene->sound_scene, handle);
+ }
+
AUD_destroySet(scene->speaker_handles);
}
+ if (scene->sound_scene) {
+ AUD_Sequence_free(scene->sound_scene);
+ }
}
void BKE_sound_reset_scene_specs(Scene *scene)