]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #309.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 23 Feb 2007 09:31:36 +0000 (10:31 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 23 Feb 2007 09:31:36 +0000 (10:31 +0100)
Completize cluster spanner if necessary.

input/regression/cluster-single-note.ly [new file with mode: 0644]
lily/cluster-engraver.cc

diff --git a/input/regression/cluster-single-note.ly b/input/regression/cluster-single-note.ly
new file mode 100644 (file)
index 0000000..5b66a79
--- /dev/null
@@ -0,0 +1,8 @@
+\header
+{
+  texidoc = "don't crash on single chord clusters."
+}
+
+
+\version "2.11.19"
+\relative c' { \makeClusters <e d'> } 
index e5ed481f6a53d8e32820f4d96ff4ac424717291f..898846e2d8db20e40be284aabfd1718f5e646992 100644 (file)
@@ -55,7 +55,17 @@ Cluster_spanner_engraver::finalize ()
 void
 Cluster_spanner_engraver::typeset_grobs ()
 {
-  finished_spanner_ = 0;
+  if (finished_spanner_)
+    {
+      if (!finished_spanner_->get_bound (RIGHT))
+       {
+         finished_spanner_->set_bound (RIGHT,
+                                       finished_spanner_->get_bound (LEFT));
+                                       
+       }
+      
+      finished_spanner_ = 0;
+    }
   beacon_ = 0;
 }