]> de.git.xonotic.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)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Aug 2010 20:41:56 +0000 (20:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10377 d7cf8633-e32d-0410-b094-e92efae38249

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)