mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 04:39:33 +01:00
Make Session listen to DropReferences from Sources, and remove them. Call drop_references for a Source in one imnportant case which occurs during MIDI track creation.
git-svn-id: svn://localhost/ardour2/branches/3.0@6996 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e55f93ff61
commit
e112ed3d6a
2 changed files with 2 additions and 0 deletions
|
|
@ -1323,6 +1323,7 @@ MidiDiskstream::use_new_write_source (uint32_t n)
|
|||
|
||||
if (_write_source->is_empty ()) {
|
||||
_write_source->mark_for_remove ();
|
||||
_write_source->drop_references ();
|
||||
_write_source.reset();
|
||||
} else {
|
||||
_write_source.reset();
|
||||
|
|
|
|||
|
|
@ -2424,6 +2424,7 @@ Session::add_source (boost::shared_ptr<Source> source)
|
|||
}
|
||||
|
||||
if (result.second) {
|
||||
source->DropReferences.connect_same_thread (*this, boost::bind (&Session::remove_source, this, boost::weak_ptr<Source> (source)));
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue