From 259d1207256c1f93ef030e3ccc91d357bfd388b9 Mon Sep 17 00:00:00 2001 From: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com> Date: Sat, 21 Oct 2023 17:46:15 +0530 Subject: [PATCH] Fix invalid for loop to while (#6943) --- src/gui/editors/PianoRoll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index cef2205d2..6bf1b5daf 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -2517,7 +2517,7 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me ) // We iterate from last note in MIDI clip to the first, // chronologically auto it = notes.rbegin(); - for( int i = 0; i < notes.size(); ++i ) + while (it != notes.rend()) { Note* n = *it;