From ffcb2a47024aa6fe52d4f3b34f93928f3751538e Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 2 Jun 2022 22:46:50 +0800 Subject: [PATCH] Fix build error when FreeType is disabled --- modules/text_server_adv/text_server_adv.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 0f45855a76b..598ccd1238a 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -5640,8 +5640,10 @@ TextServerAdvanced::TextServerAdvanced() { TextServerAdvanced::~TextServerAdvanced() { _bmp_free_font_funcs(); +#ifdef MODULE_FREETYPE_ENABLED if (ft_library != nullptr) { FT_Done_FreeType(ft_library); } +#endif u_cleanup(); }