diff --git a/src/lib/evas/common/evas_text_utils.c b/src/lib/evas/common/evas_text_utils.c index 7abf07fa6f..0134bd8170 100644 --- a/src/lib/evas/common/evas_text_utils.c +++ b/src/lib/evas/common/evas_text_utils.c @@ -89,12 +89,6 @@ evas_common_text_props_content_unref(Evas_Text_Props *props) /* No content in this case */ if (!props->info) return; - - if (props->font_instance) - { - evas_common_font_int_unref(props->font_instance); - props->font_instance = NULL; - } free(props->glyphs); props->glyphs = NULL; @@ -102,6 +96,12 @@ evas_common_text_props_content_unref(Evas_Text_Props *props) if (--(props->info->refcount) == 0) { + if (props->font_instance) + { + evas_common_font_int_unref(props->font_instance); + props->font_instance = NULL; + } + if (props->info->glyph) free(props->info->glyph); #ifdef OT_SUPPORT