mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Prevent infinite loop when destroying sources (issue #250)
This commit is contained in:
@@ -271,9 +271,9 @@ namespace openal
|
||||
if(i != playing.end())
|
||||
{
|
||||
source->stopAtomic();
|
||||
source->release();
|
||||
available.push(i->second);
|
||||
playing.erase(i++);
|
||||
source->release();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ namespace openal
|
||||
|
||||
Source::~Source()
|
||||
{
|
||||
pool->stop(this);
|
||||
if (valid)
|
||||
pool->stop(this);
|
||||
alDeleteBuffers((type == TYPE_STATIC) ? 1 : MAX_BUFFERS, buffers);
|
||||
if (decoder)
|
||||
decoder->release();
|
||||
|
||||
Reference in New Issue
Block a user