mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fixed race condition in Source:play (thanks Boolsheet)
This commit is contained in:
@@ -118,11 +118,11 @@ int Pool::getMaxSources() const
|
||||
|
||||
bool Pool::play(Source *source, ALuint &out)
|
||||
{
|
||||
bool ok;
|
||||
out = 0;
|
||||
|
||||
thread::Lock lock(mutex);
|
||||
|
||||
bool ok = true;
|
||||
out = 0;
|
||||
|
||||
bool alreadyPlaying = findSource(source, out);
|
||||
|
||||
if (!alreadyPlaying)
|
||||
|
||||
Reference in New Issue
Block a user