evas: fix possible seg with font glyphs from font instance in glyph array with no refcounting.

This commit is contained in:
Carsten Haitzler 2013-06-14 19:55:53 +09:00
parent 4d86f508ae
commit ae2f824413
2 changed files with 4 additions and 0 deletions

View File

@ -236,6 +236,7 @@ evas_common_font_glyphs_unref(Evas_Glyph_Array *array)
if (--array->refcount) return;
eina_inarray_free(array->array);
evas_common_font_int_unref(array->fi);
free(array);
}
@ -323,6 +324,8 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
if (!text_props->glyphs) goto error;
text_props->glyphs->refcount = 1;
text_props->glyphs->array = glyphs;
text_props->glyphs->fi = fi;
fi->references++;
}
/* check if there's a request queue in fi, if so ask cserve2 to render

View File

@ -29,6 +29,7 @@ typedef struct _Evas_Glyph_Array Evas_Glyph_Array;
struct _Evas_Glyph_Array
{
Eina_Inarray *array;
void *fi;
unsigned int refcount;
};