]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-collision.cc
* ly/engraver-init.ly: Make FiguredBass accepted in GrandStaff and
[lilypond.git] / lily / note-collision.cc
index a3f18ab0026be756ee22c60280ea201afd0bd428..e84e5263c63a57160ce55f577232db2e40a40e83 100644 (file)
@@ -48,7 +48,8 @@ check_meshing_chords (Grob *me,
   if (ups[0] > dps.back () + 1)
     return;
 
-  // FIXME: what's this?
+  /* Merge heads if the notes lie the same line, or if the "stem-up-note" is
+     above the "stem-down-note". */
   bool merge_possible = (ups[0] >= dps[0]) && (ups.back () >= dps.back ());
 
   /* Do not merge notes typeset in different style. */
@@ -304,7 +305,9 @@ Note_collision_interface::calc_positioning_done (SCM smob)
       if (cg[d].size ())
        {
          Grob *h = cg[d][0];
-         wid = Note_column::first_head (h)->extent (h, X_AXIS).length ();
+         Grob *fh = Note_column::first_head (h);
+         if (fh)
+           wid = fh->extent (h, X_AXIS).length ();
        }
     }
   while (flip (&d) != UP);
@@ -354,7 +357,14 @@ Note_collision_interface::get_clash_groups (Grob *me)
     {
       Grob *se = elements[i];
       if (Note_column::has_interface (se))
-       clash_groups[Note_column::dir (se)].push_back (se);
+       {
+         if (!Note_column::dir (se))
+           {
+             se->programming_error ("note-column has no direction");
+           }
+         else
+           clash_groups[Note_column::dir (se)].push_back (se);
+       }
     }
 
   Direction d = UP;