]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a seldom sound related segfault
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Aug 2010 20:41:56 +0000 (20:41 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 10 Aug 2010 06:35:01 +0000 (08:35 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10377 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=9bc2e636a2ab94ab7bdd1f7241e3cdc020e9283e

snd_main.c

index ce04f8051d93f901a78e01ebbff919b910139bf7..52dde53fa4c3df6045de3dd82eb68d56f2cfbb91 100644 (file)
@@ -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)