aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 610e70cb..969c49d1 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1798,7 +1798,8 @@ static ALvoid GetSourceOffset(ALsource *Source, ALenum name, ALfloat *offset, AL
BufferList = Source->queue;
for(i = 0;i < Source->BuffersPlayed && BufferList;i++)
{
- readPos += BufferList->buffer->size;
+ if(BufferList->buffer)
+ readPos += BufferList->buffer->size;
BufferList = BufferList->next;
}