Fix Playlist refcount when deleting track
Both Disk-reader and Disk-writer use the same playlist. ARDOUR::Track::use_playlist() sets it for both Disk-IO processors, so it needs to be released by both on destruction.
This commit is contained in:
parent
7054b2ffc7
commit
ab79165893
@ -78,6 +78,12 @@ DiskIOProcessor::~DiskIOProcessor ()
|
||||
|
||||
channels.flush ();
|
||||
delete _midi_buf;
|
||||
|
||||
for (uint32_t n = 0; n < DataType::num_types; ++n) {
|
||||
if (_playlists[n]) {
|
||||
_playlists[n]->release ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,12 +68,6 @@ DiskReader::DiskReader (Session& s, string const & str, DiskIOProcessor::Flag f)
|
||||
DiskReader::~DiskReader ()
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::Destruction, string_compose ("DiskReader %1 @ %2 deleted\n", _name, this));
|
||||
|
||||
for (uint32_t n = 0; n < DataType::num_types; ++n) {
|
||||
if (_playlists[n]) {
|
||||
_playlists[n]->release ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user