Fix error in c5f7ccba49
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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user