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:38:50 +0000 (20:38 +0000)
analysis window while the analysis is running.

Cherry-picked from 6b1d9adcf6e75fc8e441b61108a2169bda6a6094 in
v2.15.x.

src/wx/audio_plot.cc

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