Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(256)

Unified Diff: lily/multi-measure-rest.cc

Issue 576090043: Fix #5964: MM Rests shouldn’t segfault when there’s no StaffSymbol.
Patch Set: Not worth messing around with staff-symbol functions. Reverting. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « input/regression/multi-measure-rest-no-staff.ly ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/multi-measure-rest.cc
diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc
index dc47182fe1780a063395af84f7f29ab87a599938..753873891028aa97d222f12351ee286adbcbe627 100644
--- a/lily/multi-measure-rest.cc
+++ b/lily/multi-measure-rest.cc
@@ -265,8 +265,8 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measure_cou
Real pos;
Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
- std::vector<Real> linepos = Staff_symbol::line_positions (staff);
- bool oneline = linepos.size () == 1;
+ // If there is no StaffSymbol, print MMrests on one (invisible) line.
+ bool oneline = (!staff) || Staff_symbol::line_positions (staff). size () < 2;
if (scm_is_null (sp))
{
« no previous file with comments | « input/regression/multi-measure-rest-no-staff.ly ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b