bug-lilypond
[Top][All Lists]
Advanced

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

Ugly bug in 1.4.7 and 1.5.8


From: Han-Wen Nienhuys
Subject: Ugly bug in 1.4.7 and 1.5.8
Date: Sat, 8 Sep 2001 17:40:15 +0200

address@hidden writes:
> Hi,
> 
> I tried input/test/orchestscore.ly and input/test/coriolan-margin.ly
> and both crash the same way on 1.4.7 and 1.5.8.

try this patch. Transplanting the 1.5 code to 1.4 should also work.

--- span-bar.cc~        Fri Jun 29 13:49:46 2001
+++ span-bar.cc Sat Sep  8 17:50:02 2001
@@ -76,22 +76,27 @@
 
   // compose span_bar_mol
   Molecule span_bar_mol;
-  Grob *prev_staff_bar = 0;
+
+  Interval prev_extent;
   for (SCM elts = first_elt; gh_pair_p (elts); elts = gh_cdr (elts))
     {
       SCM smobbed_staff_bar = gh_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
-      if (prev_staff_bar)
+      Interval ext = staff_bar->extent (refp, Y_AXIS);
+      if (ext.empty_b ())
+       continue; 
+      
+      if (!prev_extent.empty_b ())
        {
-         Interval l(prev_staff_bar->extent (refp, Y_AXIS)[UP],
-                    staff_bar->extent (refp, Y_AXIS)[DOWN]);
+         Interval l(prev_extent [UP],
+                    ext[DOWN]);
 
          Molecule interbar
            = Bar::compound_barline (staff_bar, glyph_str, l.length());
          interbar.translate_axis (l.center (), Y_AXIS);
          span_bar_mol.add_molecule (interbar);
        }
-      prev_staff_bar = staff_bar;
+      prev_extent = ext;
     }
 
   span_bar_mol.translate_axis (- me->relative_coordinate (refp, Y_AXIS), 
Y_AXIS);

-- 

Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

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