]> git.donarmstrong.com Git - lilypond.git/commit
Issue 3205: opening bar check causes crash if \score contains the \midi block
authorDavid Kastrup <dak@gnu.org>
Wed, 27 Feb 2013 00:26:14 +0000 (01:26 +0100)
committerDavid Kastrup <dak@gnu.org>
Tue, 5 Mar 2013 21:42:28 +0000 (22:42 +0100)
commitc83a3afbc51c62769cbb8963371d37b312bbcd42
treebc62dd9ffc574d15a4ae0132557ddc70c4974f0f
parent887000f61099efaf85d6d5b580f20fcf84c0fc6f
Issue 3205: opening bar check causes crash if \score contains the \midi block

This derives Bar_check_iterator from Music_iterator rather than from
Simple_music_iterator.

In
\score {
  { | d }
  \midi { }
}

the bar check iterator is being called while only the \Global context
exists.  That causes Score_performer::one_time_step to be called
without getting Score_performer::prepare to be called previously,
probably because the Score context is created at the wrong time.  The
Score_performer is not prepared for this situation.

I have no idea how to fix Simple_music_iterator, why it exists in the
first place and is written like it is, and why this appears to work.
lily/bar-check-iterator.cc