X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscore-performer.cc;h=cbfb013ddb9e9380d4032e481fb3ac2a2f4c0947;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=f47963f5e9ae43405dbb7b4ef4baf5fc92cf7113;hpb=4a401ca1c60f428daa242dbdd102fdb3f327ebfb;p=lilypond.git diff --git a/lily/score-performer.cc b/lily/score-performer.cc index f47963f5e9..cbfb013ddb 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1996--2011 Jan Nieuwenhuizen + Copyright (C) 1996--2014 Jan Nieuwenhuizen LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -131,6 +131,17 @@ IMPLEMENT_LISTENER (Score_performer, one_time_step); void Score_performer::one_time_step (SCM) { + // audio_column_ can be 0 when prepare has not been called. The + // condition is triggered when Simple_music_iterator implicitly + // creates a Score context, like when writing + // + // \score { { | c4 c c c } \midi { } } + // + // The same situation happens with the Score_engraver group, but it + // would appear not to suffer any bad side effects. + + if (!audio_column_) + audio_column_ = new Audio_column (context ()->now_mom ()); if (to_boolean (context ()->get_property ("skipTypesetting"))) { if (!skipping_) @@ -174,4 +185,3 @@ Score_performer::initialize () Translator_group::initialize (); } -