Browse Source

Fix build error when FreeType is disabled

Haoyu Qiu 3 years ago
parent
commit
ffcb2a4702
1 changed files with 2 additions and 0 deletions
  1. 2 0
      modules/text_server_adv/text_server_adv.cpp

+ 2 - 0
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();
 }