summaryrefslogtreecommitdiff
path: root/src/client/snd_mix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/snd_mix.c')
-rw-r--r--src/client/snd_mix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/snd_mix.c b/src/client/snd_mix.c
index 71cfd781..682e03ce 100644
--- a/src/client/snd_mix.c
+++ b/src/client/snd_mix.c
@@ -599,7 +599,7 @@ void S_PaintChannelFromMuLaw( channel_t *ch, sfx_t *sc, int count, int sampleOff
samp[i].left += (data * leftvol)>>8;
samp[i].right += (data * rightvol)>>8;
samples++;
- if (samples == (byte *)chunk->sndChunk+(SND_CHUNK_SIZE*2)) {
+ if (chunk != NULL && samples == (byte *)chunk->sndChunk+(SND_CHUNK_SIZE*2)) {
chunk = chunk->next;
samples = (byte *)chunk->sndChunk;
}