Skip to content

Commit

Permalink
fix #28106: crash on entry of one-sided slur
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Jul 22, 2014
1 parent d90b918 commit d513a41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libmscore/slur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,9 +802,9 @@ void Slur::slurPos(SlurPos* sp)
sp->p1 = scr->pagePos() - sp->system1->pagePos();
sp->p2 = ecr->pagePos() - sp->system2->pagePos();
// account for centering or other adjustments (other than mirroring)
if (!note1->mirror())
if (note1 && !note1->mirror())
sp->p1.rx() += note1->x();
if (!note2->mirror())
if (note2 && !note2->mirror())
sp->p2.rx() += note2->x();

qreal xo, yo;
Expand Down Expand Up @@ -903,7 +903,7 @@ void Slur::slurPos(SlurPos* sp)
yo = fixArticulations(yo, sc, __up);
}
}
else if (sc->up() != _up)
else if (sc && sc->up() != _up)
yo = fixArticulations(yo, sc, __up);

if (sa1 == SlurAnchor::NONE)
Expand Down Expand Up @@ -968,7 +968,7 @@ void Slur::slurPos(SlurPos* sp)
else if (ec->up() != _up)
yo = fixArticulations(yo, ec, __up);
}
else if (ec->up() != _up)
else if (ec && ec->up() != _up)
yo = fixArticulations(yo, ec, __up);

if (sa2 == SlurAnchor::NONE)
Expand Down

0 comments on commit d513a41

Please sign in to comment.