From 11d801df865019c3d3dd60a329111cc85c5dac4a Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Thu, 6 Jun 2019 09:43:44 +0200 Subject: [PATCH] fix #290094: Crash when modifying appoggiatura from imported MusicXml file. --- libmscore/note.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmscore/note.cpp b/libmscore/note.cpp index d76051aaa7289..c571a51e960e3 100644 --- a/libmscore/note.cpp +++ b/libmscore/note.cpp @@ -3108,9 +3108,10 @@ std::vector Note::tiedNotes() const notes.push_back(note); while (note->tieFor()) { - if (std::find(notes.begin(), notes.end(), note->tieFor()->endNote()) != notes.end()) + Note* endNote = note->tieFor()->endNote(); + if (!endNote || std::find(notes.begin(), notes.end(), endNote) != notes.end()) break; - note = note->tieFor()->endNote(); + note = endNote; notes.push_back(note); } return notes;