X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fall-font-metrics-scheme.cc;h=b29ea4bf4bfc48c885b72d7f7aefff50901752e6;hb=750b714488c5af6eae22d07163bba8b554734ac6;hp=354a2b10d85a8e11130b785b2f30c3db2dc92a50;hpb=99b6f3aa3558b01c9d4158b19a1f1794c534f89c;p=lilypond.git diff --git a/lily/all-font-metrics-scheme.cc b/lily/all-font-metrics-scheme.cc index 354a2b10d8..b29ea4bf4b 100644 --- a/lily/all-font-metrics-scheme.cc +++ b/lily/all-font-metrics-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2007--2014 Han-Wen Nienhuys + Copyright (C) 2007--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify @@ -20,13 +20,17 @@ #include "all-font-metrics.hh" #include "main.hh" +#include "protected-scm.hh" + +All_font_metrics *all_fonts_global = 0; +Protected_scm all_fonts_global_scm; LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0, (), "Forget all about previously loaded fonts.") { - delete all_fonts_global; all_fonts_global = new All_font_metrics (global_path.to_string ()); + all_fonts_global_scm = all_fonts_global->unprotect (); return SCM_UNSPECIFIED; }