Skip to content

Commit

Permalink
Don't mix sfx with NULL soundData
Browse files Browse the repository at this point in the history
Caused a crash. Already done for looping sounds.
  • Loading branch information
zturtleman committed Mar 11, 2014
1 parent 63d1911 commit a167110
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/client/snd_mix.c
Expand Up @@ -711,6 +711,10 @@ void S_PaintChannels( int endtime ) {
ltime = s_paintedtime;
sc = ch->thesfx;

if (sc->soundData==NULL || sc->soundLength==0) {
continue;
}

sampleOffset = ltime - ch->startSample;
count = end - ltime;
if ( sampleOffset + count > sc->soundLength ) {
Expand Down

0 comments on commit a167110

Please sign in to comment.