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 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];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue