mirror of https://github.com/odrling/Aegisub
Fixed some mismatched new[]/deletes in the audio display detected by valgrind
Originally committed to SVN as r2967.
This commit is contained in:
parent
fff437ea19
commit
bceabf4848
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue