Seems to fix audio spectrum crash.

Originally committed to SVN as r727.
This commit is contained in:
Niels Martin Hansen 2007-01-06 21:56:25 +00:00
parent 8ec4322174
commit 2d7af197ee

View file

@ -677,7 +677,10 @@ protected:
void AudioDisplay::DrawSpectrum(wxDC &finaldc,bool weak) {
// Spectrum bitmap
if (!weak || !spectrumDisplay || spectrumDisplay->GetWidth() != w || spectrumDisplay->GetHeight() != h) {
if (spectrumDisplay) delete spectrumDisplay;
if (spectrumDisplay) {
delete spectrumDisplay;
spectrumDisplay = 0;
}
//spectrumDisplay = new wxBitmap(w,h);
weak = false;
}