Skip to content

Commit

Permalink
Merge pull request #1732 from MarcSabatella/46356-crash-undo-tie
Browse files Browse the repository at this point in the history
fix #46356: crash after undo of paste with tie forward
  • Loading branch information
wschweer committed Feb 9, 2015
2 parents d0bc493 + 083a2e7 commit 5b37144
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libmscore/score.cpp
Expand Up @@ -69,6 +69,7 @@
#include "sym.h"
#include "rehearsalmark.h"
#include "breath.h"
#include "tie.h"

namespace Ms {

Expand Down Expand Up @@ -1568,6 +1569,15 @@ void Score::removeElement(Element* element)
break;

case Element::Type::CHORD:
{
Chord* c = static_cast<Chord*>(element);
for (Note* n : c->notes()) {
Tie* t = n->tieFor();
if (t)
n->remove(t);
}
}
// fall through
case Element::Type::REST:
{
ChordRest* cr = static_cast<ChordRest*>(element);
Expand Down

0 comments on commit 5b37144

Please sign in to comment.