summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alSource.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 78ccef9a..16e3a930 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2516,6 +2516,7 @@ static ALdouble GetSourceSecOffset(const ALsource *Source)
Buffer = BufferList->buffer;
BufferList = BufferList->next;
}
+ assert(Buffer != NULL);
return (ALdouble)readPos / (ALdouble)FRACTIONONE / (ALdouble)Buffer->Frequency;
}
@@ -2561,6 +2562,8 @@ static ALvoid GetSourceOffsets(const ALsource *Source, ALenum name, ALdouble *of
}
BufferList = BufferList->next;
}
+ assert(Buffer != NULL);
+
if(Source->state == AL_PLAYING)
writePos = readPos + (ALuint)(updateLen*Buffer->Frequency);
else