diff options
author | Chris Robinson <[email protected]> | 2014-09-03 16:02:00 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-09-03 16:02:00 -0700 |
commit | 30e01a7dba78826ab4b0099a313c6f8a46656e42 (patch) | |
tree | 546afa23b8dd914cdaf5828bd865767c07ca11c2 /OpenAL32 | |
parent | 7f5497b86385cbf7d1164b80f8f420e0657a6d38 (diff) |
Protect alProcessUpdatesSOFT with a lock
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alState.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c index b001d3f4..b4f17b9d 100644 --- a/OpenAL32/alState.c +++ b/OpenAL32/alState.c @@ -769,11 +769,11 @@ AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void) context = GetContextRef(); if(!context) return; + LockContext(context); if(ExchangeInt(&context->DeferUpdates, AL_FALSE)) { ALsizei pos; - LockContext(context); LockUIntMapRead(&context->SourceMap); for(pos = 0;pos < context->SourceMap.size;pos++) { @@ -793,8 +793,8 @@ AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void) SetSourceState(Source, context, new_state); } UnlockUIntMapRead(&context->SourceMap); - UnlockContext(context); } + UnlockContext(context); ALCcontext_DecRef(context); } |