timeline: handle users deleting tentative subtitle track

Fixes potential crash if users try to do this
This commit is contained in:
itsmattkc
2022-05-11 13:47:12 -07:00
parent 78d5314c0a
commit f17c119c29
6 changed files with 85 additions and 31 deletions
@@ -145,6 +145,7 @@ void TrackViewItem::ShowContextMenu(const QPoint &p)
void TrackViewItem::DeleteTrack()
{
emit AboutToDeleteTrack(track_);
Core::instance()->undo_stack()->push(new TimelineRemoveTrackCommand(track_));
}