1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-20 05:07:53 +01:00

null pointer checks on all uses of WaveTrackCache::Get

This commit is contained in:
Paul Licameli
2017-03-16 19:24:36 -04:00
parent 31832b21a3
commit 87775d35e0
2 changed files with 23 additions and 7 deletions

View File

@@ -854,12 +854,16 @@ bool SpecCache::CalculateOneSpectrum
myLen)
);
if (copy)
memcpy(adj, useBuffer, myLen * sizeof(float));
if (copy) {
if (useBuffer)
memcpy(adj, useBuffer, myLen * sizeof(float));
else
memset(adj, 0, myLen * sizeof(float));
}
}
}
if (copy)
if (copy || !useBuffer)
useBuffer = scratch;
if (autocorrelation) {