diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-18 21:55:50 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-18 21:55:50 +0200 |
commit | 26532364bbd2e591f9dcc2a28b0eb22a88a90472 (patch) | |
tree | fe3ee660e1c0414afd76da98735d547c961f232f /libs/ardour/io.cc | |
parent | 218b016a80a54db9f2804c258354ba7c39374888 (diff) |
fix possible crash at session close.
In the wake of 81faa3b420303eec2ca0e3. Disconnect Signal from process
callback, may notify an IO that just reached a zero shared ptr refcount
due to route-deletion (GUI thread) resulting in a double free.
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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<Port> a, boost::shared_ptr<Port> 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, |