Skip to content
Permalink
Browse files

fix #66576: Opening a score createted via 'Save selection' of a linke…

…d staff causes a crash
  • Loading branch information...
lasconic committed Jun 30, 2015
1 parent 0157b62 commit 9fc6a2062755fe76c560aff9d184f19f811b1ff9
Showing with 7 additions and 0 deletions.
  1. +7 −0 libmscore/scorefile.cpp
@@ -185,6 +185,13 @@ void Score::write(Xml& xml, bool selectionOnly)
if (selectionOnly) {
staffStart = _selection.staffStart();
staffEnd = _selection.staffEnd();
// make sure we select full parts
Staff* sStaff = staff(staffStart);
Part* sPart = sStaff->part();
Staff* eStaff = staff(staffEnd - 1);
Part* ePart = eStaff->part();
staffStart = staffIdx(sPart);
staffEnd = staffIdx(ePart) + ePart->nstaves();
measureStart = _selection.startSegment()->measure();
if (_selection.endSegment())
measureEnd = _selection.endSegment()->measure()->next();

0 comments on commit 9fc6a20

Please sign in to comment.
You can’t perform that action at this time.