aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 1fd2f707..7a9c6326 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -428,8 +428,13 @@ static ALvoid InitializeEffect(ALCcontext *Context, ALeffectslot *ALEffectSlot,
else if(effect->type == AL_EFFECT_ECHO)
NewState = EchoCreate();
/* No new state? An error occured.. */
- if(!NewState)
+ if(NewState == NULL ||
+ ALEffect_DeviceUpdate(NewState, Context->Device) == AL_FALSE)
+ {
+ if(NewState)
+ ALEffect_Destroy(NewState);
return;
+ }
}
if(ALEffectSlot->EffectState)
ALEffect_Destroy(ALEffectSlot->EffectState);