Fix memory leak which also causes strange flickering in the audio
authorCarl Hetherington <cth@carlh.net>
Wed, 29 Jul 2020 20:29:45 +0000 (22:29 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 29 Jul 2020 20:29:45 +0000 (22:29 +0200)
analysis window while the analysis is running.

src/wx/audio_plot.cc

index 629de77672864eaf056b34310d665845dbdac267..b8b14b2e699762ac0a061b8dbcd9474bfbe8c075 100644 (file)
@@ -150,6 +150,7 @@ AudioPlot::paint ()
        if (!_analysis || _analysis->channels() == 0) {
                gc->SetFont (gc->CreateFont (*wxNORMAL_FONT));
                gc->DrawText (_message, 32, 32);
        if (!_analysis || _analysis->channels() == 0) {
                gc->SetFont (gc->CreateFont (*wxNORMAL_FONT));
                gc->DrawText (_message, 32, 32);
+               delete gc;
                return;
        }
 
                return;
        }