Han-Wen,

The leger line fix (4146a0e0549c424bc129fc985733a36801a6e6a2) turned
out to have a basic flaw in that it messed up dot and tie positions
for standard staves. I pushed a fix for this
(b5ba6d4fdb551ebd0dd55140696f4a7e19e82fdb), but my coding has turned
out to be a bit iffy, since it causes a crash when the
Staff_symbol_engraver is removed and notes have dots or ties.

Here's a patch which sorts it out; is it OK, or do you think it could
be improved?

Cheers,
Neil
From 90784a799bd70cb41e625178dd457ee36c0d78cc Mon Sep 17 00:00:00 2001
From: Neil Puttock <[EMAIL PROTECTED]>
Date: Sat, 26 Jul 2008 22:22:19 +0100
Subject: [PATCH] Fix segfault.

---
 lily/staff-symbol.cc |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc
index 6e37643..63c9301 100644
--- a/lily/staff-symbol.cc
+++ b/lily/staff-symbol.cc
@@ -169,9 +169,14 @@ Staff_symbol::height  (SCM smob)
 
 bool
 Staff_symbol::on_line (Grob *me, int pos)
-{
-  Grob *st = Staff_symbol_referencer::get_staff_symbol (me);
-  SCM line_positions = st->get_property ("line-positions");
+{  
+  Grob *st = 0;
+  SCM line_positions = me->get_property ("line-positions");
+  if ((st = Staff_symbol_referencer::get_staff_symbol (me)))
+    line_positions = st->get_property ("line-positions");
+  else
+    st = me;  
+
   if (scm_is_pair (line_positions))
     {
       Real min_line = HUGE_VAL;
-- 
1.5.4.3

_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to