]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-symbol-engraver.cc
2003 -> 2004
[lilypond.git] / lily / staff-symbol-engraver.cc
index 71c9c8ca7de7ba5d2679eb4b47b1db1ba2f5989a..d71dcb4f2121cb2543ce394258a8dd437b5f24a3 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -45,7 +45,7 @@ Staff_symbol_engraver::process_music ()
 {
   if (!span_)
     {
-      span_ = new Spanner (get_property ("StaffSymbol"));
+      span_ = make_spanner ("StaffSymbol");
   
       span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
 
@@ -56,8 +56,11 @@ Staff_symbol_engraver::process_music ()
 void
 Staff_symbol_engraver::finalize ()
 {
-  span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
-  typeset_grob (span_);
+  if (span_)
+    {
+      span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+      typeset_grob (span_);
+    }
   span_ =0;
 }