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()
This commit is contained in:
Robin Gareus 2016-08-21 22:08:54 +02:00
parent adb492b914
commit 9e981367e2
3 changed files with 9 additions and 1 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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__ */