aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcEcho.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/alcEcho.c
parent44da54ec7f1826e3318202084e49a58a886a3f7b (diff)
The effect state being destroyed can't be NULL
Diffstat (limited to 'Alc/alcEcho.c')
-rw-r--r--Alc/alcEcho.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index 297d6e76..b4663ade 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -54,12 +54,11 @@ typedef struct ALechoState {
static ALvoid EchoDestroy(ALeffectState *effect)
{
ALechoState *state = STATIC_UPCAST(ALechoState, ALeffectState, effect);
- if(state)
- {
- free(state->SampleBuffer);
- state->SampleBuffer = NULL;
- free(state);
- }
+
+ free(state->SampleBuffer);
+ state->SampleBuffer = NULL;
+
+ free(state);
}
static ALboolean EchoDeviceUpdate(ALeffectState *effect, ALCdevice *Device)