From 69580da523384fc207043e4bad297d7560e24268 Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Thu, 12 May 2011 19:28:24 -0400 Subject: [PATCH] Fixes the assert problem caused by ledger line spanners. This fix makes it such that ledger lines are not printed when there is a no-line staff symbol. This makes sense, as a note cannot be above or below the staff if the staff does not exist, which means that ledger lines should not be used. --- lily/ledger-line-spanner.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lily/ledger-line-spanner.cc b/lily/ledger-line-spanner.cc index 49ff711911..a518bc9225 100644 --- a/lily/ledger-line-spanner.cc +++ b/lily/ledger-line-spanner.cc @@ -320,7 +320,7 @@ Ledger_line_spanner::print (SCM smob) Item *h = dynamic_cast (heads[i]); int pos = Staff_symbol_referencer::get_rounded_position (h); - if (!staff_extent.contains (pos - sign (pos))) + if (!staff_extent.contains (pos - sign (pos)) && !staff_extent.is_empty ()) { Interval head_size = h->extent (common[X_AXIS], X_AXIS); Interval ledger_size = head_size; -- 2.39.5