Fixed some mismatched new[]/deletes in the audio display detected by valgrind

Originally committed to SVN as r2967.
This commit is contained in:
harukalover 2009-05-22 00:05:25 +00:00
parent fff437ea19
commit bceabf4848
1 changed files with 4 additions and 4 deletions

View File

@ -133,8 +133,8 @@ AudioDisplay::~AudioDisplay() {
delete spectrumRenderer;
delete spectrumDisplay;
delete spectrumDisplaySelected;
delete peak;
delete min;
delete[] peak;
delete[] min;
provider = NULL;
player = NULL;
origImage = NULL;
@ -562,8 +562,8 @@ void AudioDisplay::DrawTimescale(wxDC &dc) {
void AudioDisplay::DrawWaveform(wxDC &dc,bool weak) {
// Prepare Waveform
if (!weak || peak == NULL || min == NULL) {
if (peak) delete peak;
if (min) delete min;
if (peak) delete[] peak;
if (min) delete[] min;
peak = new int[w];
min = new int[w];
}