Skip to content

Commit

Permalink
fix #14956: Undo unconnected tie causes crash
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Dec 3, 2012
1 parent 301dc42 commit fcc1fad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libmscore/undo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,9 @@ void AddElement::undo()
if (element->type() == Element::TIE) {
Tie* tie = static_cast<Tie*>(element);
Measure* m1 = tie->startNote()->chord()->measure();
Measure* m2 = tie->endNote()->chord()->measure();
Measure* m2 = 0;
if(tie->endNote())
m2 = tie->endNote()->chord()->measure();

if (m1 != m2)
tie->score()->cmdUpdateNotes();
Expand Down

0 comments on commit fcc1fad

Please sign in to comment.