Skip to content

Commit

Permalink
Fix #321730: Crash on corrupt MXL import
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed May 29, 2021
1 parent 1b3ed31 commit f7639dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions importexport/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,9 @@ void MusicXMLParserPass2::scorePartwise()
}
// set last measure barline to normal or MuseScore will generate light-heavy EndBarline
// TODO, handle other tracks?
if (_score->lastMeasure()->endBarLineType() == BarLineType::NORMAL)
_score->lastMeasure()->setEndBarLineType(BarLineType::NORMAL, 0);
auto lm = _score->lastMeasure();
if (lm && lm->endBarLineType() == BarLineType::NORMAL)
lm->setEndBarLineType(BarLineType::NORMAL, 0);
}

//---------------------------------------------------------
Expand Down

0 comments on commit f7639dc

Please sign in to comment.