From 6693fc75a38f93a2db2214bb065e8b42fef83855 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Tue, 19 Nov 2019 22:22:29 +0900 Subject: [PATCH] fixed obviously wrong function This function was written incorrectly and would almost always trigger an infinite loop. It's now written correctly and achieves what's intended. --- app/widget/timelinewidget/undo/undo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/widget/timelinewidget/undo/undo.cpp b/app/widget/timelinewidget/undo/undo.cpp index 5413a00d6..a62600233 100644 --- a/app/widget/timelinewidget/undo/undo.cpp +++ b/app/widget/timelinewidget/undo/undo.cpp @@ -41,10 +41,10 @@ Node* TakeNodeFromParentGraph(Node* n, QObject* new_parent = nullptr) TrackOutput* TrackFromBlock(Block* b) { - Block* next = b->next(); + Block* next = b; do { - next = b->next(); + next = next->next(); } while (next != nullptr && next->type() != Block::kEnd); // A little hacky, but this should either be a TrackOutput* or nullptr