From: Joe Neeman Date: Thu, 14 Jul 2011 23:56:28 +0000 (+1000) Subject: Fix a segfault caused by improper initialization of SCM. X-Git-Tag: release/2.15.6-1~3^2~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=13fc2437e2aaa9ec5a65926dcb54d233a4797f45;p=lilypond.git Fix a segfault caused by improper initialization of SCM. --- diff --git a/lily/pango-font.cc b/lily/pango-font.cc index a4fea75109..26f2e53fb4 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -47,6 +47,10 @@ Pango_font::Pango_font (PangoFT2FontMap *fontmap, PangoFontDescription const *description, Real output_scale) { + // This line looks stupid, but if we don't initialize physical_font_tab_ before + // we allocate memory in scm_c_make_hash_table, then that could trigger a garbage + // collection. + physical_font_tab_ = SCM_EOL; physical_font_tab_ = scm_c_make_hash_table (11); PangoDirection pango_dir = PANGO_DIRECTION_LTR; context_ = pango_context_new ();