null-check track before splitting

Fixes access violation if the user tries to split a track that doesn't exist.
This commit is contained in:
itsmattkc
2019-11-19 22:25:04 +09:00
parent 8353b8d745
commit 84f77cd58d
+5
View File
@@ -58,6 +58,11 @@ void TimelineWidget::RazorTool::MouseRelease(TimelineViewMouseEvent *event)
foreach (const TrackReference& track_ref, split_tracks_) {
TrackOutput* track = parent()->GetTrackFromReference(track_ref);
if (track == nullptr) {
continue;
}
Block* block_at_time = track->NearestBlockBefore(split_time);
// Ensure there's a valid block here