]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-wrapper.cc
Copy manual-beams example verbatim from original. Fixes png.
[lilypond.git] / lily / music-wrapper.cc
index 80405ea08e4647b2a9b1a3a184526d993cd65ff5..051187a8a4215f6d3feb6e6e8cd2283526448d70 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "music-wrapper.hh"
@@ -25,6 +25,9 @@ Music_wrapper::length_callback (SCM m)
 {
   Music *me = unsmob_music (m);
   Music *elt = unsmob_music (me->get_property ("element"));
-  return elt->get_length ().smobbed_copy ();
+  if (elt)
+    return elt->get_length ().smobbed_copy ();
+  else
+    return Moment (0).smobbed_copy ();
 }