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;
|
ALchorusState *state = (ALchorusState*)effect;
|
||||||
|
|
||||||
if (state)
|
if(state)
|
||||||
{
|
{
|
||||||
if (state->SampleBufferLeft != NULL)
|
free(state->SampleBufferLeft);
|
||||||
{
|
state->SampleBufferLeft = NULL;
|
||||||
free(state->SampleBufferLeft);
|
|
||||||
state->SampleBufferLeft = NULL;
|
free(state->SampleBufferRight);
|
||||||
}
|
state->SampleBufferRight = NULL;
|
||||||
if (state->SampleBufferRight != NULL)
|
|
||||||
{
|
|
||||||
free(state->SampleBufferRight);
|
|
||||||
state->SampleBufferRight = NULL;
|
|
||||||
}
|
|
||||||
free(state);
|
free(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,18 +58,14 @@ static ALvoid FlangerDestroy(ALeffectState *effect)
|
|||||||
{
|
{
|
||||||
ALflangerState *state = (ALflangerState*)effect;
|
ALflangerState *state = (ALflangerState*)effect;
|
||||||
|
|
||||||
if (state)
|
if(state)
|
||||||
{
|
{
|
||||||
if (state->SampleBufferLeft != NULL)
|
free(state->SampleBufferLeft);
|
||||||
{
|
state->SampleBufferLeft = NULL;
|
||||||
free(state->SampleBufferLeft);
|
|
||||||
state->SampleBufferLeft = NULL;
|
free(state->SampleBufferRight);
|
||||||
}
|
state->SampleBufferRight = NULL;
|
||||||
if (state->SampleBufferRight != NULL)
|
|
||||||
{
|
|
||||||
free(state->SampleBufferRight);
|
|
||||||
state->SampleBufferRight = NULL;
|
|
||||||
}
|
|
||||||
free(state);
|
free(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user