Skip to content

Commit

Permalink
Merge pull request #6236 from Jojo-Schmitz/fretboard-harmony-crash
Browse files Browse the repository at this point in the history
fix #306964: Crash when change the numerical value of Fretboard Diagram “Maximum shift above”
  • Loading branch information
igorkorsukov committed Jun 19, 2020
2 parents 1a9b942 + 7c843c3 commit 91ebd6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libmscore/layout.cpp
Expand Up @@ -3376,7 +3376,10 @@ void alignHarmonies(const System* system, const std::vector<Segment*>& sl, bool
if (e->isFretDiagram()) {
FretDiagram* fd = toFretDiagram(e);
Harmony* h = fd->harmony();
system->staff(e->staffIdx())->skyline().add(h->shape().translated(h->pos() + fd->pos() + s->pos() + m->pos()));
if (h)
system->staff(e->staffIdx())->skyline().add(h->shape().translated(h->pos() + fd->pos() + s->pos() + m->pos()));
else
system->staff(e->staffIdx())->skyline().add(fd->shape().translated(fd->pos() + s->pos() + m->pos()));
}
}
}
Expand Down

0 comments on commit 91ebd6a

Please sign in to comment.