From: David Kastrup Date: Sun, 20 Oct 2013 19:53:42 +0000 (+0200) Subject: Issue 2392: Segfault in connection with \applyContext X-Git-Tag: release/2.17.95-1~4^2~22 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6b9921f0e2b8c73ebb3063109562d97fba898dab;p=lilypond.git Issue 2392: Segfault in connection with \applyContext --- diff --git a/lily/score-performer.cc b/lily/score-performer.cc index 9dc229a48d..92c6625534 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -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 ()->get_global_context ()->now_mom ()); if (to_boolean (context ()->get_property ("skipTypesetting"))) { if (!skipping_) @@ -174,4 +185,3 @@ Score_performer::initialize () Translator_group::initialize (); } -