From 7bdcc127e3e42bd76b997b56ecd938b1127d790b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 28 Oct 2011 17:04:09 +0000 Subject: Use shared_ptr for Port in the AudioEngine; improves thread-safety of the audio engine's port list as a writer cannot destroy a port in one thread while the port list is being iterated in another. git-svn-id: svn://localhost/ardour2/branches/3.0@10327 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/bundle.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/ardour/bundle.cc') diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc index 37e4733e14..1948024d91 100644 --- a/libs/ardour/bundle.cc +++ b/libs/ardour/bundle.cc @@ -421,8 +421,8 @@ Bundle::connected_to (boost::shared_ptr other, AudioEngine & engine) for (uint32_t j = 0; j < A.size(); ++j) { for (uint32_t k = 0; k < B.size(); ++k) { - Port* p = engine.get_port_by_name (A[j]); - Port* q = engine.get_port_by_name (B[k]); + boost::shared_ptr p = engine.get_port_by_name (A[j]); + boost::shared_ptr q = engine.get_port_by_name (B[k]); if (!p && !q) { return false; -- cgit v1.2.3