]> git.donarmstrong.com Git - lilypond.git/commitdiff
Protect SCM members in Instrument_name_engraver/Instrument_switch_engraver.
authorNeil Puttock <n.puttock@gmail.com>
Sun, 21 Feb 2010 17:32:23 +0000 (17:32 +0000)
committerNeil Puttock <n.puttock@gmail.com>
Sun, 21 Feb 2010 17:32:23 +0000 (17:32 +0000)
lily/instrument-name-engraver.cc
lily/instrument-switch-engraver.cc

index c4b1100bd83dd96872e3b32ed48e6efee3f2e435..26a6fdd04d80066c3d879b4880e8d0ff4772c0d7 100644 (file)
@@ -46,8 +46,17 @@ protected:
   void start_spanner ();
   void consider_start_spanner ();
   void stop_spanner ();
+
+  virtual void derived_mark () const;
 };
 
+void
+Instrument_name_engraver::derived_mark () const
+{
+  scm_gc_mark (long_text_);
+  scm_gc_mark (short_text_);
+}
+
 Instrument_name_engraver::Instrument_name_engraver ()
 {
   text_spanner_ = 0;
index 717d06d6776ba2119febe790733692d3011b4659..8bd364646c58af80b5089ef388f34b70f9c00f56 100644 (file)
@@ -21,6 +21,7 @@
 #include "engraver.hh"
 #include "item.hh"
 #include "text-interface.hh"
+
 #include "translator.icc"
 
 
@@ -34,8 +35,15 @@ protected:
 
   void stop_translation_time_step ();
   void process_music ();
+
+  virtual void derived_mark () const;
 };
 
+void
+Instrument_switch_engraver::derived_mark () const
+{
+  scm_gc_mark (cue_name_);
+}
 
 Instrument_switch_engraver::Instrument_switch_engraver ()
 {
@@ -50,7 +58,7 @@ void
 Instrument_switch_engraver::process_music ()
 {
   SCM cue_text = get_property ("instrumentCueName");
-  
+
   if (!scm_is_eq (cue_name_, cue_text))
     {
       if (Text_interface::is_markup (cue_text))