mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Fix deadlock at session-close, due to shared-ptr in signal connection
https://pastebin.com/08UcTRsP https://ardour.org/styleguide.html # 10
This commit is contained in:
parent
6e67eba5bb
commit
5361a3f5c4
2 changed files with 5 additions and 4 deletions
|
|
@ -375,13 +375,14 @@ BundleManager::add_bundle (boost::shared_ptr<Bundle> b)
|
|||
(*i)[_list_model_columns.name] = u->name ();
|
||||
(*i)[_list_model_columns.bundle] = u;
|
||||
|
||||
u->Changed.connect (bundle_connections, invalidator (*this), boost::bind (&BundleManager::bundle_changed, this, _1, u), gui_context());
|
||||
u->Changed.connect (bundle_connections, invalidator (*this), boost::bind (&BundleManager::bundle_changed, this, _1, boost::weak_ptr<UserBundle> (u)), gui_context());
|
||||
}
|
||||
|
||||
void
|
||||
BundleManager::bundle_changed (Bundle::Change c, boost::shared_ptr<UserBundle> b)
|
||||
BundleManager::bundle_changed (Bundle::Change c, boost::weak_ptr<UserBundle> wb)
|
||||
{
|
||||
if ((c & Bundle::NameChanged) == 0) {
|
||||
boost::shared_ptr<UserBundle> b = wb.lock ();
|
||||
if (!b || 0 == (c & Bundle::NameChanged)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue