File tree 1 file changed +8
-4
lines changed
src/engraving/compat/midi
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -631,8 +631,8 @@ static int calculateTieLength(const Note* note)
631
631
const Note* n = note;
632
632
while (n) {
633
633
// Process ties or bends
634
- Tie* tieFor = n->tieFor ();
635
- GuitarBend* bendFor = n->bendFor ();
634
+ const Tie* tieFor = n->tieForNonPartial ();
635
+ const GuitarBend* bendFor = n->bendFor ();
636
636
637
637
if (tieFor && tieFor->endNote () != n) {
638
638
n = tieFor->endNote ();
@@ -642,10 +642,14 @@ static int calculateTieLength(const Note* note)
642
642
break ;
643
643
}
644
644
645
- NoteEventList nel = n->playEvents ();
645
+ IF_ASSERT_FAILED (n) {
646
+ break ;
647
+ }
648
+
649
+ const NoteEventList& nel = n->playEvents ();
646
650
647
651
if (!nel.empty ()) {
648
- tieLen += n-> playEvents () [0 ].len () * n->chord ()->actualTicks ().ticks () / NoteEvent::NOTE_LENGTH;
652
+ tieLen += nel [0 ].len () * n->chord ()->actualTicks ().ticks () / NoteEvent::NOTE_LENGTH;
649
653
}
650
654
}
651
655
You can’t perform that action at this time.
0 commit comments