From bad55b06635baaf0b8e2909b485ad9a5310de875 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 6 Aug 2010 20:41:56 +0000 Subject: [PATCH] fix a seldom sound related segfault git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10377 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=9bc2e636a2ab94ab7bdd1f7241e3cdc020e9283e --- snd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snd_main.c b/snd_main.c index ce04f805..52dde53f 100644 --- a/snd_main.c +++ b/snd_main.c @@ -1674,7 +1674,8 @@ static void S_SetChannelVolume_WithSfx (unsigned int ch_ind, float fvol, sfx_t * void S_SetChannelVolume(unsigned int ch_ind, float fvol) { sfx_t *sfx = channels[ch_ind].sfx; - S_SetChannelVolume_WithSfx(ch_ind, fvol, sfx); + if(sfx) + S_SetChannelVolume_WithSfx(ch_ind, fvol, sfx); } float S_GetChannelPosition (unsigned int ch_ind) -- 2.39.2