From b8ee77cecc749139c04d7d3684ff5d1f0972a53b Mon Sep 17 00:00:00 2001 From: Dominic Fandrey Date: Sun, 27 Nov 2016 10:05:13 +0100 Subject: [PATCH] Avoid srcList[-1] in snd_openal.c --- code/client/snd_openal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c index 5ba5c7c6..8184b074 100644 --- a/code/client/snd_openal.c +++ b/code/client/snd_openal.c @@ -900,7 +900,8 @@ static void S_AL_NewLoopMaster(src_t *rmSource, qboolean iskilled) S_AL_SaveLoopPos(rmSource, rmSource->alSource); } } - else if(rmSource == &srcList[curSfx->masterLoopSrc]) + else if(curSfx->masterLoopSrc != -1 && + rmSource == &srcList[curSfx->masterLoopSrc]) { int firstInactive = -1;