]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2608: Lyrics iteration can't handle some unusual setups
authorDavid Kastrup <dak@gnu.org>
Tue, 7 Jul 2015 13:23:21 +0000 (15:23 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 14 Jul 2015 05:17:35 +0000 (07:17 +0200)
This avoids continued use of an associated Voice context that is no
longer associated with any iterators.

lily/lyric-combine-music-iterator.cc
lily/lyric-engraver.cc

index b64251beeda3ec2a78df26f47ca288fdd68c25fb..336b167f2e98cdf2d4179b687330d1913b6d21b9 100644 (file)
@@ -161,7 +161,8 @@ Lyric_combine_music_iterator::run_always () const
 bool
 Lyric_combine_music_iterator::ok () const
 {
-  return lyric_iter_ && lyric_iter_->ok ();
+  return lyric_iter_ && lyric_iter_->ok ()
+    && !(music_context_ && music_context_->is_removable ());
 }
 
 void
index fadb35d6b4c8dd3d10e7a541b5bdabc80da2d1b7..bc576bf3ccc669f23fbea53df01ce072c069549b 100644 (file)
@@ -96,7 +96,10 @@ get_voice_to_lyrics (Context *lyrics)
 
   SCM avc = lyrics->get_property ("associatedVoiceContext");
   if (Context *c = unsmob<Context> (avc))
-    return c;
+    {
+      if (!c->is_removable ())
+        return c;
+    }
 
   SCM voice_name = lyrics->get_property ("associatedVoice");
   string nm = lyrics->id_string ();