aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alEffect.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r--OpenAL32/alEffect.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index b4fe8173..26d5398d 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -59,6 +59,7 @@ AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects)
if(!effect || (err=InitEffect(effect)) != AL_NO_ERROR)
{
free(effect);
+ alDeleteEffects(cur, effects);
al_throwerr(Context, err);
}
@@ -71,17 +72,13 @@ AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects)
memset(effect, 0, sizeof(ALeffect));
free(effect);
+ alDeleteEffects(cur, effects);
al_throwerr(Context, err);
}
effects[cur] = effect->id;
}
}
- al_catchany()
- {
- if(cur > 0)
- alDeleteEffects(cur, effects);
- }
al_endtry;
ALCcontext_DecRef(Context);