From bed8ad6f95a5dc71a0860535387a027ee62637b3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 3 May 2019 19:44:49 +0200 Subject: Fix crash in background rendering after recent sound changes --- source/blender/blenkernel/intern/sound.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/sound.c') diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 04e34331826..978b287ba22 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -532,12 +532,14 @@ void BKE_sound_reset_scene_specs(Scene *scene) { sound_verify_evaluated_id(&scene->id); - AUD_Specs specs; + if (scene->sound_scene) { + AUD_Specs specs; - specs.channels = AUD_Device_getChannels(sound_device); - specs.rate = AUD_Device_getRate(sound_device); + specs.channels = AUD_Device_getChannels(sound_device); + specs.rate = AUD_Device_getRate(sound_device); - AUD_Sequence_setSpecs(scene->sound_scene, specs); + AUD_Sequence_setSpecs(scene->sound_scene, specs); + } } void BKE_sound_mute_scene(Scene *scene, int muted) -- cgit v1.2.3