Skip to content

Commit

Permalink
fix #307900: Crash when switching voices if notes are tied
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz authored and anatoly-os committed Aug 26, 2020
1 parent 37fe896 commit 05ee013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmscore/undo.cpp
Expand Up @@ -2341,7 +2341,7 @@ void ChangeSpannerElements::flip(EditData*)
Element* oldEndElement = spanner->endElement();
if (spanner->anchor() == Spanner::Anchor::NOTE) {
// be sure new spanner elements are of the right type
if (!startElement->isNote() || !endElement->isNote()) {
if (!startElement || !startElement->isNote() || !endElement || !endElement->isNote()) {
return;
}
Note* oldStartNote = toNote(oldStartElement);
Expand Down

0 comments on commit 05ee013

Please sign in to comment.