]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix potential NULL dereference in Staff_symbol::on_line(). release/2.11.55-2
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 6 Aug 2008 11:48:52 +0000 (08:48 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 6 Aug 2008 11:48:52 +0000 (08:48 -0300)
lily/staff-symbol.cc

index 6e376434ca3a3b7412520c6591c588a344711e46..6fefc48010750e7daa9b2f9ed0078305047eff4b 100644 (file)
@@ -170,8 +170,7 @@ 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");
+  SCM line_positions = me->get_property ("line-positions");
   if (scm_is_pair (line_positions))
     {
       Real min_line = HUGE_VAL;
@@ -195,7 +194,7 @@ Staff_symbol::on_line (Grob *me, int pos)
       return false;
     }
   else
-    return ((abs (pos + line_count (st)) % 2) == 1);
+    return ((abs (pos + line_count (me)) % 2) == 1);
 }
 
 ADD_INTERFACE (Staff_symbol,