aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-04-10 17:31:08 -0700
committerChris Robinson <[email protected]>2010-04-10 17:31:08 -0700
commit1544ddf0a51466e83a03331a7403eaaae084c77a (patch)
tree12c249929cccd67e9557b9ec2992bd2f2c51795e /OpenAL32
parent488ec612bb086895af8b2e402ff7cc9e27f45c15 (diff)
Avoid reading buffer 0's size
Diffstat (limited to 'OpenAL32')
-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;
}