Fixed: Possible crash when queued buffers are already empty
--HG-- branch : develop
This commit is contained in:
parent
1e6027c970
commit
1635330a14
1 changed files with 1 additions and 1 deletions
|
@ -194,7 +194,7 @@ uint CSourceAL::countStreamingBuffers() const
|
|||
// a bit ugly here, but makes a much easier/simpler implementation on both drivers
|
||||
ALint buffersProcessed;
|
||||
alGetSourcei(_Source, AL_BUFFERS_PROCESSED, &buffersProcessed);
|
||||
while (buffersProcessed)
|
||||
while (buffersProcessed && !_QueuedBuffers.empty())
|
||||
{
|
||||
ALuint bufferName = _QueuedBuffers.front()->bufferName();
|
||||
alSourceUnqueueBuffers(_Source, 1, &bufferName);
|
||||
|
|
Loading…
Reference in a new issue