Commit f19c2faa authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix crash on mix undo

parent 7c4a8b0d
Pipeline #93361 passed with stage
in 8 minutes and 39 seconds
......@@ -1934,6 +1934,13 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, std::pair<int, int>
Fun destroy_mix = [clipIds, this]() {
if (auto ptr = m_parent.lock()) {
if (m_sameCompositions.count(clipIds.second) == 0) {
// Mix was already deleted
if (m_mixList.contains(clipIds.first)) {
m_mixList.remove(clipIds.first);
}
return true;
}
Mlt::Transition &transition = *static_cast<Mlt::Transition*>(m_sameCompositions[clipIds.second]->getAsset());
std::shared_ptr<ClipModel> movedClip(ptr->getClipPtr(clipIds.second));
movedClip->setMixDuration(0);
......
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