Commit ac4795e7 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

Fix crash on bin clip deletion with instance on locked track

BUG: 459260
parent a5351b85
......@@ -1967,7 +1967,9 @@ bool ProjectClip::selfSoftDelete(Fun &undo, Fun &redo)
}
if (auto timeline = clip.second.lock()) {
timeline->requestClipUngroup(clip.first, undo, redo);
timeline->requestItemDeletion(clip.first, undo, redo, true);
if (!timeline->requestItemDeletion(clip.first, undo, redo, true)) {
return false;
}
} else {
qDebug() << "Error while deleting clip: timeline unavailable";
Q_ASSERT(false);
......
......@@ -674,7 +674,9 @@ bool ProjectItemModel::requestBinClipDeletion(const std::shared_ptr<AbstractProj
binId = ptr->clipId();
}
bool isSubClip = clip->itemType() == AbstractProjectItem::SubClipItem;
clip->selfSoftDelete(undo, redo);
if (!clip->selfSoftDelete(undo, redo)) {
return false;
}
int id = clip->getId();
Fun operation = removeItem_lambda(id);
Fun reverse = addItem_lambda(clip, parentId);
......
Supports Markdown
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