Bug Check: Handle null pointers in FFT code
This shouldn't happen, but it should be guarded properly nonetheless. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
10bfb204b5
commit
78ec3d39eb
1 changed files with 2 additions and 4 deletions
|
@ -130,10 +130,8 @@ static VisualizationController *_sharedController = nil;
|
|||
|
||||
@synchronized(self) {
|
||||
if(!sampleRate) {
|
||||
bzero(outPCM, 4096 * sizeof(float));
|
||||
if(outFFT) {
|
||||
bzero(outFFT, 2048 * sizeof(float));
|
||||
}
|
||||
if(outPCM) bzero(outPCM, 4096 * sizeof(float));
|
||||
if(outFFT) bzero(outFFT, 2048 * sizeof(float));
|
||||
return;
|
||||
}
|
||||
int latencySamples = (int)(sampleRate * (self->latency + latency)) + 2048;
|
||||
|
|
Loading…
Reference in a new issue