From 467443865407342d8ebd266c625612ad506ec60e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 4 Aug 2012 04:34:49 +0000 Subject: [PATCH] do fcfini now - it seesm to not be a problem with fc anymore SVN revision: 74870 --- legacy/evas/src/lib/canvas/evas_font_dir.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_font_dir.c b/legacy/evas/src/lib/canvas/evas_font_dir.c index 93f307bd48..2ada50668b 100644 --- a/legacy/evas/src/lib/canvas/evas_font_dir.c +++ b/legacy/evas/src/lib/canvas/evas_font_dir.c @@ -57,11 +57,12 @@ static int fc_init = 0; void evas_font_dir_cache_free(void) { - if (!font_dirs) return; - - eina_hash_foreach(font_dirs, font_cache_dir_free, NULL); - eina_hash_free(font_dirs); - font_dirs = NULL; + if (font_dirs) + { + eina_hash_foreach(font_dirs, font_cache_dir_free, NULL); + eina_hash_free(font_dirs); + font_dirs = NULL; + } #ifdef HAVE_FONTCONFIG /* this is bad i got a: @@ -71,9 +72,13 @@ evas_font_dir_cache_free(void) * it as in reality - there is little reason to care about the memory not * being freed etc. * - * fc_init--; - * if (fc_init == 0) FcFini(); + * note 04/08/2012 - this doesnt seem to cause an issue anymore? */ + if (fc_init > 0) + { + fc_init--; + if (fc_init == 0) FcFini(); + } #endif }