From bed8345172356bcdaffcc68609c14eb024b762bf Mon Sep 17 00:00:00 2001 From: Leon Vinken Date: Sun, 24 Nov 2024 21:14:08 +0100 Subject: [PATCH] Fix GH#25617: Prevent crash importing MusicXML file containing grace rest followed by tuple starting with rest Backport of #25629 --- importexport/musicxml/importmxmlpass2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp index cce57db4a860f..544f9a44d8659 100644 --- a/importexport/musicxml/importmxmlpass2.cpp +++ b/importexport/musicxml/importmxmlpass2.cpp @@ -6286,9 +6286,13 @@ Note* MusicXMLParserPass2::note(const QString& partId, // begin allocation if (rest) { + if (!grace) { const int track = msTrack + msVoice; cr = addRest(_score, measure, noteStartTime, track, msMove, duration, dura); + } + else + qDebug("ignoring grace rest"); } else { if (!grace) {