From de387c853f00af409fc2cdceb0736f60934389c2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 21 May 2013 02:37:27 -0700 Subject: The effect state being destroyed can't be NULL --- Alc/alcReverb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Alc/alcReverb.c') diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index 71b21e1b..6de2c66f 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -1174,12 +1174,11 @@ static ALvoid ReverbUpdate(ALeffectState *effect, ALCdevice *Device, const ALeff static ALvoid ReverbDestroy(ALeffectState *effect) { ALverbState *State = STATIC_UPCAST(ALverbState, ALeffectState, effect); - if(State) - { - free(State->SampleBuffer); - State->SampleBuffer = NULL; - free(State); - } + + free(State->SampleBuffer); + State->SampleBuffer = NULL; + + free(State); } // This creates the reverb state. It should be called only when the reverb -- cgit v1.2.3