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

Fix possible crash detected by tests

parent bc9de7c4
......@@ -2599,18 +2599,20 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
all_items.insert(itemId);
if (isClip(itemId) && logUndo) {
int tid = getItemTrackId(itemId);
if (right) {
if (getTrackById_const(tid)->hasEndMix(itemId)) {
if (tid > -1) {
if (right) {
if (getTrackById_const(tid)->hasEndMix(itemId)) {
sync_mix = [this, tid, logUndo]() {
getTrackById_const(tid)->syncronizeMixes(logUndo);
return true;
};
}
} else if (getTrackById_const(tid)->hasStartMix(itemId)) {
sync_mix = [this, tid, logUndo]() {
getTrackById_const(tid)->syncronizeMixes(logUndo);
return true;
};
}
} else if (getTrackById_const(tid)->hasStartMix(itemId)) {
sync_mix = [this, tid, logUndo]() {
getTrackById_const(tid)->syncronizeMixes(logUndo);
return true;
};
}
}
PUSH_LAMBDA(sync_mix, undo);
......
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