fix #74881: crash on copy of rest into mmrest
This commit is contained in:
parent
d073c1feb6
commit
065909f146
1 changed files with 14 additions and 0 deletions
|
@ -1932,6 +1932,20 @@ void ScoreView::paint(const QRect& r, QPainter& p)
|
|||
|
||||
if (!ss)
|
||||
return;
|
||||
|
||||
if (!ss->measure()->system()) {
|
||||
// segment is in a measure that has not been laid out yet
|
||||
// this can happen in mmrests
|
||||
// first chordrest segment of mmrest instead
|
||||
const Measure* mmr = ss->measure()->mmRest1();
|
||||
if (mmr)
|
||||
ss = mmr->first(Segment::Type::ChordRest);
|
||||
else
|
||||
return; // not an mmrest?
|
||||
if (!ss)
|
||||
return; // mmrest has no chordrest segment?
|
||||
}
|
||||
|
||||
p.setBrush(Qt::NoBrush);
|
||||
|
||||
QPen pen;
|
||||
|
|
Loading…
Reference in a new issue