lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix #5964: MM Rests shouldn’t segfault when there’s no StaffSymbol.


From: nine . fierce . ballads
Subject: Re: Fix #5964: MM Rests shouldn’t segfault when there’s no StaffSymbol. (issue 576090043 by address@hidden)
Date: Thu, 07 May 2020 05:18:47 -0700

https://codereview.appspot.com/576090043/diff/557790043/lily/multi-measure-rest.cc
File lily/multi-measure-rest.cc (right):

https://codereview.appspot.com/576090043/diff/557790043/lily/multi-measure-rest.cc#newcode268
lily/multi-measure-rest.cc:268: bool oneline = (!staff) ||
Staff_symbol::line_positions (staff).size() == 1;
If there is no staff symbol, then there isn't even one line. Are you
sure you don't want this?

    bool oneline = staff ? /*etc.*/ : false;

Incidentally, I am surprised to see the amount of work involved in
determining whether the staff has one line.  It's not the kind of thing
one expects to involve heap allocation.  That's not a problem with your
change, though.

https://codereview.appspot.com/576090043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]