Fix various crashes on session close.

git-svn-id: svn://localhost/ardour2/branches/3.0@6186 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-11-26 13:26:30 +00:00
parent 966e09677d
commit b3d86acf38
3 changed files with 16 additions and 8 deletions

View file

@ -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->set_deletion_in_progress ();
session->remove_pending_capture_state ();
delete session; delete session;
session = 0;
} }
ArdourDialog::close_all_dialogs (); ArdourDialog::close_all_dialogs ();

View file

@ -50,12 +50,6 @@ using namespace ARDOUR;
void void
ARDOUR_UI::shutdown () 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(); ui_config->save_state();
} }
@ -124,6 +118,7 @@ ARDOUR_UI::toggle_editor_mixer_on_top ()
} }
} }
/** The main editor window has been closed */
gint gint
ARDOUR_UI::exit_on_main_window_close (GdkEventAny * /*ev*/) ARDOUR_UI::exit_on_main_window_close (GdkEventAny * /*ev*/)
{ {

View file

@ -163,8 +163,14 @@ Route::~Route ()
{ {
Metering::disconnect (_meter_connection); Metering::disconnect (_meter_connection);
clear_processors (PreFader); /* don't use clear_processors here, as it depends on the session which may
clear_processors (PostFader); 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 void