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
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ private:
|
|||
void edit_clicked ();
|
||||
void delete_clicked ();
|
||||
void add_bundle (boost::shared_ptr<ARDOUR::Bundle>);
|
||||
void bundle_changed (ARDOUR::Bundle::Change, boost::shared_ptr<ARDOUR::UserBundle>);
|
||||
void bundle_changed (ARDOUR::Bundle::Change, boost::weak_ptr<ARDOUR::UserBundle>);
|
||||
void set_button_sensitivity ();
|
||||
void row_activated (Gtk::TreeModel::Path const & p, Gtk::TreeViewColumn* c);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user