diff options
author | Robin Gareus <robin@gareus.org> | 2016-08-21 22:08:54 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-08-21 23:02:37 +0200 |
commit | 9e981367e2cf27cf0d19914e03f55a8c405c7188 (patch) | |
tree | 2f170b205ab167b3a7d5c09270689d0aa123a53e | |
parent | adb492b914ab157dfd718b0555d1d48a4e591974 (diff) |
Fix another crash at exit:
Collecting bindings after ::finish() has already destroyed half the GUI
will result in memory corruption invalid Glib::RefPtr<Gtk::Action>
Gtkmm2ext::ActionMap::get_actions()
Gtkmm2ext::Bindings::get_all_actions()
KeyEditor::Tab::populate()
KeyEditor::refresh()
Editor::set_script_action_name()
LuaInstance::session_going_away()
PBD::Destructible::drop_references()
ARDOUR::Session::destroy()
ARDOUR::Session::~Session()
ARDOUR_UI::finish()
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/keyeditor.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/keyeditor.h | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index e9cf5b2041..6190d9d2d4 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1284,6 +1284,8 @@ If you still wish to quit, please use the\n\n\ */ save_ardour_state (); + key_editor->disconnect (); + close_all_dialogs (); if (_session) { diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index b19b6d5fc0..aea8185f3b 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -122,7 +122,7 @@ KeyEditor::KeyEditor () add (vpacker); unbind_button.set_sensitive (false); - UpdateBindings.connect (sigc::mem_fun (*this, &KeyEditor::refresh)); + _refresh_connection = UpdateBindings.connect (sigc::mem_fun (*this, &KeyEditor::refresh)); } void diff --git a/gtk2_ardour/keyeditor.h b/gtk2_ardour/keyeditor.h index a5662333ce..3e4c5d068c 100644 --- a/gtk2_ardour/keyeditor.h +++ b/gtk2_ardour/keyeditor.h @@ -45,6 +45,10 @@ class KeyEditor : public ArdourWindow static sigc::signal<void> UpdateBindings; + void disconnect () { + _refresh_connection.disconnect (); + } + private: class Tab : public Gtk::VBox { @@ -124,6 +128,8 @@ class KeyEditor : public ArdourWindow void toggle_sort_type (); void search_string_updated (const std::string&); void print () const; + + sigc::connection _refresh_connection; }; #endif /* __ardour_gtk_key_editor_h__ */ |