From 3c64b04040ae18b98bed7b9b95f156aae1cf4420 Mon Sep 17 00:00:00 2001
From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Mon, 5 Aug 2002 00:10:10 +0000
Subject: [PATCH] *** empty log message ***

---
 input/test/rhythm-excercise.ly | 18 ++++++++++++++++++
 lily/note-head.cc              |  3 ++-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 input/test/rhythm-excercise.ly

diff --git a/input/test/rhythm-excercise.ly b/input/test/rhythm-excercise.ly
new file mode 100644
index 0000000000..a15f5ee979
--- /dev/null
+++ b/input/test/rhythm-excercise.ly
@@ -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
+		       }
+	 }
+     }
diff --git a/lily/note-head.cc b/lily/note-head.cc
index 2cc60c17b6..4b2596c298 100644
--- a/lily/note-head.cc
+++ b/lily/note-head.cc
@@ -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);
 }
 
 
-- 
2.39.5