]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pango-font.cc
Merge branch 'master' of git://git.savannah.gnu.org/lilypond.git
[lilypond.git] / lily / pango-font.cc
index 21ab85ab667052697d8038e1aea8a59f5f792f14..26f2e53fb4b5fce47b0294c5626cd3f9018cb733 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2004--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -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 ();
@@ -300,7 +304,7 @@ Pango_font::physical_font_tab () const
 extern bool music_strings_to_paths;
 
 Stencil
-Pango_font::text_stencil (Output_def *state,
+Pango_font::text_stencil (Output_def * /* state */,
                          string str, bool music_string) const
 {
   /*