Remove unnecessary NULL checks
This commit is contained in:
parent
3fd0f23e48
commit
2486f13dae
@ -58,18 +58,14 @@ static ALvoid ChorusDestroy(ALeffectState *effect)
|
||||
{
|
||||
ALchorusState *state = (ALchorusState*)effect;
|
||||
|
||||
if (state)
|
||||
if(state)
|
||||
{
|
||||
if (state->SampleBufferLeft != NULL)
|
||||
{
|
||||
free(state->SampleBufferLeft);
|
||||
state->SampleBufferLeft = NULL;
|
||||
}
|
||||
if (state->SampleBufferRight != NULL)
|
||||
{
|
||||
free(state->SampleBufferRight);
|
||||
state->SampleBufferRight = NULL;
|
||||
}
|
||||
free(state->SampleBufferLeft);
|
||||
state->SampleBufferLeft = NULL;
|
||||
|
||||
free(state->SampleBufferRight);
|
||||
state->SampleBufferRight = NULL;
|
||||
|
||||
free(state);
|
||||
}
|
||||
}
|
||||
|
@ -58,18 +58,14 @@ static ALvoid FlangerDestroy(ALeffectState *effect)
|
||||
{
|
||||
ALflangerState *state = (ALflangerState*)effect;
|
||||
|
||||
if (state)
|
||||
if(state)
|
||||
{
|
||||
if (state->SampleBufferLeft != NULL)
|
||||
{
|
||||
free(state->SampleBufferLeft);
|
||||
state->SampleBufferLeft = NULL;
|
||||
}
|
||||
if (state->SampleBufferRight != NULL)
|
||||
{
|
||||
free(state->SampleBufferRight);
|
||||
state->SampleBufferRight = NULL;
|
||||
}
|
||||
free(state->SampleBufferLeft);
|
||||
state->SampleBufferLeft = NULL;
|
||||
|
||||
free(state->SampleBufferRight);
|
||||
state->SampleBufferRight = NULL;
|
||||
|
||||
free(state);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user