diff options
author | Chris Robinson <[email protected]> | 2010-04-10 17:31:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-04-10 17:31:08 -0700 |
commit | 1544ddf0a51466e83a03331a7403eaaae084c77a (patch) | |
tree | 12c249929cccd67e9557b9ec2992bd2f2c51795e /OpenAL32 | |
parent | 488ec612bb086895af8b2e402ff7cc9e27f45c15 (diff) |
Avoid reading buffer 0's size
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alSource.c | 3 |
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; } |