From 8689a68ad5230d33a6791764a999e7bf024cd055 Mon Sep 17 00:00:00 2001 From: sakertooth Date: Wed, 27 Sep 2023 08:10:44 -0400 Subject: [PATCH] Fix error in c5f7ccba492dd867524156afa652c4eff99f9b40 We still have to delete the Clip's, or else we would just be eating up memory. But we should first make sure that the Track's no longer see this Clip in their m_clips vector. This has to happen as it's own operation because we have to wait for the audio thread(s) first. This would ensure that Track's do not create PlayHandle's that would refer to a Clip that is currently being destroyed. After that, then we call deleteLater on the Clip. --- src/gui/clips/ClipView.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/clips/ClipView.cpp b/src/gui/clips/ClipView.cpp index f51a0eaa8..de569581c 100644 --- a/src/gui/clips/ClipView.cpp +++ b/src/gui/clips/ClipView.cpp @@ -295,11 +295,9 @@ void ClipView::remove() // delete ourself close(); - // Since the Track would own the clip, we don't delete it if (m_clip->getTrack()) { m_clip->getTrack()->removeClip(m_clip); - return; } m_clip->deleteLater();