From 9afbb649b6bb39e1f04cad990b46bd6cbf004e96 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 28 Aug 2010 12:55:53 +0000 Subject: Use weak_ptr for IOs in the bundle list to avoid holding onto them when a route is removed. Fixes #3395. git-svn-id: svn://localhost/ardour2/branches/3.0@7702 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_group.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/port_group.cc') diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index f96d465564..aabe07157b 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -209,7 +209,8 @@ PortGroup::io_from_bundle (boost::shared_ptr b) const return boost::shared_ptr (); } - return (*i)->io; + boost::shared_ptr io ((*i)->io.lock ()); + return io; } /** Remove bundles whose channels are already represented by other, larger bundles */ @@ -306,6 +307,7 @@ struct RouteIOs { } boost::shared_ptr route; + /* it's ok to use a shared_ptr here as RouteIOs structs are only used during ::gather () */ std::list > ios; }; -- cgit v1.2.3