evas: only destroy font instance when we don't reference font anymore.

SVN revision: 79806
This commit is contained in:
Cedric BAIL 2012-11-29 05:36:56 +00:00
parent 06b9a559b4
commit cbb6b39466
1 changed files with 6 additions and 6 deletions

View File

@ -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