fix #74881: crash on copy of rest into mmrest

This commit is contained in:
Marc Sabatella 2015-08-27 23:25:20 -06:00
parent d073c1feb6
commit 065909f146

View file

@ -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;