]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/modified-font-metric.cc
Issue 4997/7: Use Preinit for Global_context, protect output definition
[lilypond.git] / lily / modified-font-metric.cc
index 53ccefa2997e0c9e93a05d9b9688678b1b726db3..a93b3f4d97a4a415acc8a469453c1b7baefc9d73 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1999--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1999--2015 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
@@ -26,6 +26,11 @@ using namespace std;
 #include "main.hh"
 #include "program-option.hh"
 
+void Modified_font_metric::pre_init ()
+{
+  orig_ = 0;
+}
+
 Modified_font_metric::Modified_font_metric (Font_metric *fm,
                                             Real magnification)
 {
@@ -102,6 +107,8 @@ Modified_font_metric::index_to_charcode (vsize i) const
 void
 Modified_font_metric::derived_mark () const
 {
+  if (orig_)
+    scm_gc_mark (orig_->self_scm ());
 }
 
 Stencil