]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 5 Aug 2002 00:10:10 +0000 (00:10 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 5 Aug 2002 00:10:10 +0000 (00:10 +0000)
input/test/rhythm-excercise.ly [new file with mode: 0644]
lily/note-head.cc

diff --git a/input/test/rhythm-excercise.ly b/input/test/rhythm-excercise.ly
new file mode 100644 (file)
index 0000000..a15f5ee
--- /dev/null
@@ -0,0 +1,18 @@
+\header {
+
+    texidoc = " a way to generate rhythm exercises with lilypond
+    (e.g. no staff but retaining the barlines"
+
+
+}
+
+\score { \notes { c4 c4 [ c8 c8 ] }
+
+        \paper {
+            \translator { \StaffContext
+                          \remove Staff_symbol_engraver
+                          \consists Pitch_squash_engraver
+                          \remove Clef_engraver
+                      }
+        }
+     }
index 2cc60c17b691860bd1dd6227b57c14afdbba191d..4b2596c298f19376dcf4b35d74e51fa5a44cb3d9 100644 (file)
@@ -186,7 +186,8 @@ Note_head::brew_molecule (SCM smob)
 Interval
 Note_head::head_extent (Grob *me, Axis a)
 {
-  return me->get_molecule()->extent (a);
+  Molecule * mol = me->get_molecule();
+  return mol ? mol ->extent (a) : Interval(0,0);
 }