aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcChorus.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-21 02:37:27 -0700
committerChris Robinson <[email protected]>2013-05-21 02:37:27 -0700
commitde387c853f00af409fc2cdceb0736f60934389c2 (patch)
treed84effbbe841d6a34465ac0b1ad78119f2545b44 /Alc/alcChorus.c
parent44da54ec7f1826e3318202084e49a58a886a3f7b (diff)
The effect state being destroyed can't be NULL
Diffstat (limited to 'Alc/alcChorus.c')
-rw-r--r--Alc/alcChorus.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/Alc/alcChorus.c b/Alc/alcChorus.c
index 5f360d17..f02544c4 100644
--- a/Alc/alcChorus.c
+++ b/Alc/alcChorus.c
@@ -53,16 +53,14 @@ typedef struct ALchorusState {
static ALvoid ChorusDestroy(ALeffectState *effect)
{
ALchorusState *state = STATIC_UPCAST(ALchorusState, ALeffectState, effect);
- if(state)
- {
- free(state->SampleBufferLeft);
- state->SampleBufferLeft = NULL;
- free(state->SampleBufferRight);
- state->SampleBufferRight = NULL;
+ free(state->SampleBufferLeft);
+ state->SampleBufferLeft = NULL;
- free(state);
- }
+ free(state->SampleBufferRight);
+ state->SampleBufferRight = NULL;
+
+ free(state);
}
static ALboolean ChorusDeviceUpdate(ALeffectState *effect, ALCdevice *Device)