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:
parent
adb492b914
commit
9e981367e2
|
@ -1284,6 +1284,8 @@ If you still wish to quit, please use the\n\n\
|
||||||
*/
|
*/
|
||||||
save_ardour_state ();
|
save_ardour_state ();
|
||||||
|
|
||||||
|
key_editor->disconnect ();
|
||||||
|
|
||||||
close_all_dialogs ();
|
close_all_dialogs ();
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
|
|
|
@ -122,7 +122,7 @@ KeyEditor::KeyEditor ()
|
||||||
add (vpacker);
|
add (vpacker);
|
||||||
|
|
||||||
unbind_button.set_sensitive (false);
|
unbind_button.set_sensitive (false);
|
||||||
UpdateBindings.connect (sigc::mem_fun (*this, &KeyEditor::refresh));
|
_refresh_connection = UpdateBindings.connect (sigc::mem_fun (*this, &KeyEditor::refresh));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -45,6 +45,10 @@ class KeyEditor : public ArdourWindow
|
||||||
|
|
||||||
static sigc::signal<void> UpdateBindings;
|
static sigc::signal<void> UpdateBindings;
|
||||||
|
|
||||||
|
void disconnect () {
|
||||||
|
_refresh_connection.disconnect ();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Tab : public Gtk::VBox
|
class Tab : public Gtk::VBox
|
||||||
{
|
{
|
||||||
|
@ -124,6 +128,8 @@ class KeyEditor : public ArdourWindow
|
||||||
void toggle_sort_type ();
|
void toggle_sort_type ();
|
||||||
void search_string_updated (const std::string&);
|
void search_string_updated (const std::string&);
|
||||||
void print () const;
|
void print () const;
|
||||||
|
|
||||||
|
sigc::connection _refresh_connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_gtk_key_editor_h__ */
|
#endif /* __ardour_gtk_key_editor_h__ */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user