diff options
author | Chris Robinson <[email protected]> | 2016-05-12 23:12:11 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-05-12 23:12:11 -0700 |
commit | 9e6d8342de62df83377b19577268af7106cdc088 (patch) | |
tree | b60690e092a3c5d7de442273e8cfeafd814a0a72 /OpenAL32/alAuxEffectSlot.c | |
parent | 8d14824c657a1471d08e175c8153909627313d70 (diff) |
Hold the effect and filter maps while handling effects and filters
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 368a0fb1..70bb4e43 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -182,11 +182,17 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param { case AL_EFFECTSLOT_EFFECT: device = context->Device; + + LockEffectsRead(device); effect = (value ? LookupEffect(device, value) : NULL); if(!(value == 0 || effect != NULL)) + { + UnlockEffectsRead(device); SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); - + } err = InitializeEffect(device, slot, effect); + UnlockEffectsRead(device); + if(err != AL_NO_ERROR) SET_ERROR_AND_GOTO(context, err, done); break; |