Skip to content

Commit

Permalink
fix possible crash when layouting glissando when chord has dot but no…
Browse files Browse the repository at this point in the history
…tes doesn't because in a tabstaff
  • Loading branch information
lasconic committed Nov 11, 2014
1 parent 1e8c3a3 commit 23af7b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmscore/glissando.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void Glissando::layout()
LedgerLine * ledLin = static_cast<Chord*>(cr)->ledgerLines();
// if dots, from right of last dot (assume a standard dot with of 1/4 sp)
// if no dots, from right of ledger line, if any; from right of note head, if no ledger line
qreal x1 = (dots ? anchor1->dot(dots-1)->pos().x() + anchor1->dot(dots-1)->width()
qreal x1 = (dots && anchor1->dot(dots-1) ? anchor1->dot(dots-1)->pos().x() + anchor1->dot(dots-1)->width()
: (ledLin ? ledLin->pos().x() + ledLin->width() : anchor1->headWidth()) )
- x1off; // make relative to end note
qreal y1 = anchor2->y() - y1off;
Expand Down

1 comment on commit 23af7b0

@lasconic
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.