Skip to content

Commit 1e7d798

Browse files
miiizenRomanPudashkin
authored andcommitted
Fix crash on measure-layout tag in first measure of piece
1 parent 643ac8c commit 1e7d798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/importexport/musicxml/internal/musicxml/importmxmlpass2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2895,7 +2895,7 @@ void MusicXMLParserPass2::measureLayout(Measure* measure)
28952895
while (m_e.readNextStartElement()) {
28962896
if (m_e.name() == "measure-distance") {
28972897
const Spatium val(m_e.readDouble() / 10.0);
2898-
if (!measure->prev()->isHBox()) {
2898+
if (!measure->prev() || !measure->prev()->isHBox()) {
28992899
MeasureBase* gap = m_score->insertBox(ElementType::HBOX, measure);
29002900
toHBox(gap)->setBoxWidth(val);
29012901
}

0 commit comments

Comments
 (0)