Unset playlist's TimeDomain Parent when deleting Track

This fixes a heap-use-after-free, when deleting a Track
and then doing a 3-point edit which iterates over all
playlists.
This commit is contained in:
Robin Gareus 2023-10-02 01:57:07 +02:00
parent 1455619e7d
commit afa295d4af
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -76,6 +76,12 @@ Track::~Track ()
{
DEBUG_TRACE (DEBUG::Destruction, string_compose ("track %1 destructor\n", _name));
for (auto const& p : _playlists) {
if (p) {
p->clear_time_domain_parent ();
}
}
if (_disk_reader) {
_disk_reader.reset ();
}