diff options
author | Carl Hetherington <carl@carlh.net> | 2009-11-26 13:26:30 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-11-26 13:26:30 +0000 |
commit | b3d86acf38e3a433e601c19ca6dd68555182da83 (patch) | |
tree | 91944d8e6fc92d8f1dd58742e9ec01d9ea55127b | |
parent | 966e09677d74be7d54ac253a6c244882d6efaffd (diff) |
Fix various crashes on session close.
git-svn-id: svn://localhost/ardour2/branches/3.0@6186 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 7 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_dependents.cc | 7 | ||||
-rw-r--r-- | libs/ardour/route.cc | 10 |
3 files changed, 16 insertions, 8 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 630716b4a1..c51df14a74 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -775,8 +775,15 @@ If you still wish to quit, please use the\n\n\ } } + second_connection.disconnect (); + point_one_second_connection.disconnect (); + point_oh_five_second_connection.disconnect (); + point_zero_one_second_connection.disconnect(); + // session->set_deletion_in_progress (); + session->remove_pending_capture_state (); delete session; + session = 0; } ArdourDialog::close_all_dialogs (); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 0850d0d707..9a9a575e73 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -50,12 +50,6 @@ using namespace ARDOUR; void ARDOUR_UI::shutdown () { - if (session) { - /* we're exiting cleanly, so remove any auto-save data */ - session->remove_pending_capture_state (); - session = 0; - } - ui_config->save_state(); } @@ -124,6 +118,7 @@ ARDOUR_UI::toggle_editor_mixer_on_top () } } +/** The main editor window has been closed */ gint ARDOUR_UI::exit_on_main_window_close (GdkEventAny * /*ev*/) { diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 8d7c170759..912e80c0ea 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -163,8 +163,14 @@ Route::~Route () { Metering::disconnect (_meter_connection); - clear_processors (PreFader); - clear_processors (PostFader); + /* don't use clear_processors here, as it depends on the session which may + be half-destroyed by now */ + + Glib::RWLock::WriterLock lm (_processor_lock); + for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { + (*i)->drop_references (); + } + _processors.clear (); } void |