aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-09-03 16:02:00 -0700
committerChris Robinson <[email protected]>2014-09-03 16:02:00 -0700
commit30e01a7dba78826ab4b0099a313c6f8a46656e42 (patch)
tree546afa23b8dd914cdaf5828bd865767c07ca11c2 /OpenAL32/alState.c
parent7f5497b86385cbf7d1164b80f8f420e0657a6d38 (diff)
Protect alProcessUpdatesSOFT with a lock
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c4
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);
}