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:
Christopher Snowhill 2025-06-12 19:52:37 -07:00
parent 10bfb204b5
commit 78ec3d39eb

View file

@ -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;