Skip to content

Commit

Permalink
fix #19817 Crash on loading a file with incoplete slur spanner and li…
Browse files Browse the repository at this point in the history
…nked part
  • Loading branch information
AntonioBL committed Feb 12, 2013
1 parent f5524ab commit 5a2fcd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libmscore/scorefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ bool Score::read(XmlReader& e)
ChordRest* cr = static_cast<ChordRest*>(s->endElement());
cr->removeSpannerBack(s);
}
e.removeSpanner(s);
delete s;
break;

Expand Down
1 change: 1 addition & 0 deletions libmscore/xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class XmlReader : public QXmlStreamReader {
void addSpanner(Spanner* s) { _spanner.append(s); }
void addTuplet(Tuplet* s);
void addBeam(Beam* s) { _beams.append(s); }
void removeSpanner(Spanner* s) { _spanner.removeOne(s); }

Spanner* findSpanner(int) const;
Beam* findBeam(int) const;
Expand Down

0 comments on commit 5a2fcd7

Please sign in to comment.