Fix crash introduced in last commit

parent fb0f2ae0
...@@ -606,9 +606,12 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId, ...@@ -606,9 +606,12 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
std::function<bool(void)> local_undo = []() { return true; }; std::function<bool(void)> local_undo = []() { return true; };
std::function<bool(void)> local_redo = []() { return true; }; std::function<bool(void)> local_redo = []() { return true; };
bool res = false; bool res = false;
std::shared_ptr<ProjectClip> master = pCore->projectItemModel()->getClipByBinID(binClipId); ClipType type = ClipType::Unknown;
ClipType type = master->clipType(); if (KdenliveSettings::splitaudio()) {
if (KdenliveSettings::splitaudio() && type == ClipType::AV) { std::shared_ptr<ProjectClip> master = pCore->projectItemModel()->getClipByBinID(binClipId.section(QLatin1Char('#'), 0, 0));
type = master->clipType();
}
if (type == ClipType::AV) {
res = requestClipCreation(binClipId, id, PlaylistState::VideoOnly, local_undo, local_redo); res = requestClipCreation(binClipId, id, PlaylistState::VideoOnly, local_undo, local_redo);
res = res && requestClipMove(id, trackId, position, refreshView, logUndo, local_undo, local_redo); res = res && requestClipMove(id, trackId, position, refreshView, logUndo, local_undo, local_redo);
if (res && logUndo) { if (res && logUndo) {
......
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