diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2016-05-29 02:47:54 -0700 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2016-05-29 02:47:54 -0700 |
commit | 4802465f1a6365051604f38dae9c20c93c0f0a7b (patch) | |
tree | 826777dc9aac2c56bd53fa000e9387ceecc7717f /OpenAL32/alSource.c | |
parent | 8aa4a74a7b213f2a8a3e0126a248357e587d34a8 (diff) |
Hold the effectslot map lock while handling it
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index a15b169f..c1824d5b 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -796,12 +796,14 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp p case AL_AUXILIARY_SEND_FILTER: + LockEffectSlotsRead(Context); LockFiltersRead(device); if(!((ALuint)values[1] < device->NumAuxSends && (values[0] == 0 || (slot=LookupEffectSlot(Context, values[0])) != NULL) && (values[2] == 0 || (filter=LookupFilter(device, values[2])) != NULL))) { UnlockFiltersRead(device); + UnlockEffectSlotsRead(Context); SET_ERROR_AND_RETURN_VALUE(Context, AL_INVALID_VALUE, AL_FALSE); } @@ -846,6 +848,7 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp p Source->Send[values[1]].Slot = slot; DO_UPDATEPROPS(); } + UnlockEffectSlotsRead(Context); return AL_TRUE; |