Skip to content

Commit

Permalink
Fix crash when deleting clips
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Feb 3, 2025
1 parent 8549bee commit b590ccf
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/gui/clips/ClipView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,9 @@ void ClipView::remove()

if (m_clip->getTrack())
{
auto guard = Engine::audioEngine()->requestChangesGuard();
const auto guard = Engine::audioEngine()->requestChangesGuard();
m_clip->getTrack()->removeClip(m_clip);
}

// TODO: Clip::~Clip should not be responsible for removing the Clip from the Track.
// One would expect that a call to Track::removeClip would already do that for you, as well
// as actually deleting the Clip with the deleteLater function. That being said, it shouldn't
// be possible to make a Clip without a Track (i.e., Clip::getTrack is never nullptr).
m_clip->deleteLater();
}


Expand Down

0 comments on commit b590ccf

Please sign in to comment.