beam.cc: avoid calculating an invalid reference
In calc_beam_segments, an invalid reference to a neighboring segment
was calculated (and not used) at the extreme ends of the beam. This
caused segfaults on Fedora. Since the reference is used at most twice
anyway and in the same expression, it seems easier to just use the
expression directly (the invalid cases are then skipped due to
short-circuit evaluation).
Reported here: https://lists.gnu.org/archive/html/bug-lilypond/2018-05/msg00046.html
Perhaps I don't have right to review patch on codereview site, however patch looks good to me.
Diff:
Passes make, make check and a full make doc
Patch on countdown for May 16th
Patch counted down - please push
Pushed to staging as
commit d63756608d265d7a99444af1123b7be8a06f3cc2
Author: David Kastrup dak@gnu.org
Date: Wed May 9 13:48:35 2018 +0200