Skip to content

Commit

Permalink
Merge pull request #3821 from mattmcclinch/274449-bracket-crash
Browse files Browse the repository at this point in the history
fix #274449: Crash when editing square brackets into templates containing them
  • Loading branch information
lasconic committed Jul 31, 2018
2 parents 61840da + 84cecc8 commit 6a60be8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libmscore/staff.cpp
Expand Up @@ -687,15 +687,11 @@ bool Staff::readProperties(XmlReader& e)
else if (tag == "keylist")
_keys.read(e, score());
else if (tag == "bracket") {
BracketItem* b = new BracketItem(score());
b->setStaff(this);
b->setBracketType(BracketType(e.intAttribute("type", -1)));
b->setBracketSpan(e.intAttribute("span", 0));
int col = e.intAttribute("col", -1);
if (col == -1)
col = _brackets.size();
b->setColumn(col);
_brackets.append(b);
setBracketType(col, BracketType(e.intAttribute("type", -1)));
setBracketSpan(col, e.intAttribute("span", 0));
e.readNext();
}
else if (tag == "barLineSpan")
Expand Down

0 comments on commit 6a60be8

Please sign in to comment.