diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 3bbe34f825..87bac6b8f4 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -99,6 +99,9 @@ IO::~IO () void IO::disconnect_check (boost::shared_ptr a, boost::shared_ptr b) { + if (_session.state_of_the_state () & Session::Deletion) { + return; + } /* this could be called from within our own ::disconnect() method(s) or from somewhere that operates directly on a port. so, we don't know for sure if we can take this lock or not. if we fail,