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