From: divverent Date: Fri, 6 Aug 2010 20:41:56 +0000 (+0000) Subject: fix a seldom sound related segfault X-Git-Tag: xonotic-v0.1.0preview~230^2~101 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9bc2e636a2ab94ab7bdd1f7241e3cdc020e9283e;p=xonotic%2Fdarkplaces.git fix a seldom sound related segfault git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10377 d7cf8633-e32d-0410-b094-e92efae38249 --- 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)