diff options
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; |