summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alEffect.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-03-24 13:55:41 -0700
committerChris Robinson <[email protected]>2013-03-24 13:55:41 -0700
commit43b406ad9bb32ebde78d26255a2a4f4a09a29926 (patch)
tree6df448e540966a83070fd1155b9f64a0a00340f5 /OpenAL32/alEffect.c
parentdd48375bd6569d8695291d68152fe45016bf37b1 (diff)
Simplify al_try code
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);