diff options
author | Zack Middleton <zturtleman@gmail.com> | 2014-03-11 16:44:50 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:41 +0100 |
commit | 2c37616a88f1ab966c3de89512843bd7fab8216a (patch) | |
tree | c47d0bfcef95d4846ccbc065ffb7eca8a737347f | |
parent | 277d773b2017dfe4daec9313608a71119f5e2b0f (diff) |
Don't mix sfx with NULL soundData
Caused a crash. Already done for looping sounds.
-rw-r--r-- | src/client/snd_mix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/snd_mix.c b/src/client/snd_mix.c index 3c2fd240..faa0044c 100644 --- a/src/client/snd_mix.c +++ b/src/client/snd_mix.c @@ -712,6 +712,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 ) { |