From d43eb46d81da287ade8838029e2bb9805a7dc575 Mon Sep 17 00:00:00 2001 From: "Raine M. Ekman" Date: Fri, 13 Sep 2013 22:43:20 +0200 Subject: [PATCH] PianoRoll: fix crash when trying to mark octave chord --- src/gui/piano_roll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index e94c02208..8cccc6687 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -667,7 +667,7 @@ void pianoRoll::markSemiTone( int i ) const int first = chord->isScale() ? 0 : key; const int last = chord->isScale() ? NumKeys : key + chord->last(); - const int cap = chord->isScale() ? KeysPerOctave : chord->last(); + const int cap = ( chord->isScale() || chord->last() == 0 ) ? KeysPerOctave : chord->last(); for( int i = first; i <= last; i++ ) {