X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fall-font-metrics-scheme.cc;h=b29ea4bf4bfc48c885b72d7f7aefff50901752e6;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=738f3179b915edf23827f19cd6c372f26f448699;hpb=c054eb280fd9953596eb164f67b0f9d5555c5a32;p=lilypond.git diff --git a/lily/all-font-metrics-scheme.cc b/lily/all-font-metrics-scheme.cc index 738f3179b9..b29ea4bf4b 100644 --- a/lily/all-font-metrics-scheme.cc +++ b/lily/all-font-metrics-scheme.cc @@ -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; }