aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.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/alAuxEffectSlot.c
parentdd48375bd6569d8695291d68152fe45016bf37b1 (diff)
Simplify al_try code
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 20a37e95..dbaccaa2 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -58,6 +58,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
if(!slot || (err=InitEffectSlot(slot)) != AL_NO_ERROR)
{
al_free(slot);
+ alDeleteAuxiliaryEffectSlots(cur, effectslots);
al_throwerr(Context, err);
break;
}
@@ -71,6 +72,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
ALeffectState_Destroy(slot->EffectState);
al_free(slot);
+ alDeleteAuxiliaryEffectSlots(cur, effectslots);
al_throwerr(Context, err);
}
@@ -78,12 +80,10 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
}
err = AddEffectSlotArray(Context, n, effectslots);
if(err != AL_NO_ERROR)
- al_throwerr(Context, err);
- }
- al_catchany()
- {
- if(cur > 0)
+ {
alDeleteAuxiliaryEffectSlots(cur, effectslots);
+ al_throwerr(Context, err);
+ }
}
al_endtry;