aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-06-14 19:55:53 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-06-14 19:57:18 +0900
commitae2f824413348e764a1b3607829e57ef6e641d89 (patch)
treec4e829c3424612fe2a18ec41b3ab92a04ded3198
parentFormatting fix for 80 columns...Spankies !! ;) (diff)
downloadefl-ae2f824413348e764a1b3607829e57ef6e641d89.tar.gz
evas: fix possible seg with font glyphs from font instance in glyph array with no refcounting.
-rw-r--r--src/lib/evas/common/evas_font_draw.c3
-rw-r--r--src/lib/evas/common/evas_text_utils.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_font_draw.c b/src/lib/evas/common/evas_font_draw.c
index 7f5b9831e5..7a182f8f59 100644
--- a/src/lib/evas/common/evas_font_draw.c
+++ b/src/lib/evas/common/evas_font_draw.c
@@ -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
diff --git a/src/lib/evas/common/evas_text_utils.h b/src/lib/evas/common/evas_text_utils.h
index c24ded6015..01411fdf76 100644
--- a/src/lib/evas/common/evas_text_utils.h
+++ b/src/lib/evas/common/evas_text_utils.h
@@ -29,6 +29,7 @@ typedef struct _Evas_Glyph_Array Evas_Glyph_Array;
struct _Evas_Glyph_Array
{
Eina_Inarray *array;
+ void *fi;
unsigned int refcount;
};