Try to fix crash reported in active_jobs_changed.
authorCarl Hetherington <cth@carlh.net>
Mon, 8 Oct 2018 19:41:35 +0000 (20:41 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 8 Oct 2018 19:41:35 +0000 (20:41 +0100)
src/wx/audio_panel.cc
src/wx/audio_panel.h

index ae4ae2f..af2470f 100644 (file)
@@ -107,8 +107,7 @@ AudioPanel::AudioPanel (ContentPanel* p)
        _gain_calculate_button->Bind (wxEVT_BUTTON,   boost::bind (&AudioPanel::gain_calculate_button_clicked, this));
 
        _mapping_connection = _mapping->Changed.connect (boost::bind (&AudioPanel::mapping_changed, this, _1));
-
-       JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&AudioPanel::active_jobs_changed, this, _1, _2));
+       _active_jobs_connection = JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&AudioPanel::active_jobs_changed, this, _1, _2));
 
        add_to_grid ();
 }
index 56b6fbe..09aae05 100644 (file)
@@ -67,4 +67,5 @@ private:
        AudioDialog* _audio_dialog;
 
        boost::signals2::scoped_connection _mapping_connection;
+       boost::signals2::scoped_connection _active_jobs_connection;
 };