Fix possible crash dragging clip to timeline if video track had no mirror

parent f9bfcc57
Pipeline #21956 passed with stage
in 16 minutes and 59 seconds
......@@ -1118,7 +1118,10 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
} else {
// Dropping video, ensure we have enough audio tracks for its streams
int mirror = getMirrorTrackId(trackId);
QList <int> audioTids = getLowerTracksId(mirror, TrackType::AudioTrack);
QList <int> audioTids = {};
if (mirror > -1) {
audioTids = getLowerTracksId(mirror, TrackType::AudioTrack);
}
if (audioTids.count() < keys.count() - 1) {
// Check if project has enough audio tracks
if (keys.count() > getTracksIds(true).count()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment