From bb4e7fb86984457c3df0cd7a7fb4c9d6e17e3b92 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 2 Jul 2013 15:18:19 +0900 Subject: [PATCH] evas: fix compilation warning in evas_font_draw. Signed-off-by: Cedric Bail --- src/lib/evas/common/evas_font_draw.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/common/evas_font_draw.c b/src/lib/evas/common/evas_font_draw.c index cea367a0af..5b8423db83 100644 --- a/src/lib/evas/common/evas_font_draw.c +++ b/src/lib/evas/common/evas_font_draw.c @@ -259,7 +259,7 @@ EAPI void evas_common_font_draw_prepare(Evas_Text_Props *text_props) { RGBA_Font_Int *fi; - RGBA_Font_Glyph *fg; + RGBA_Font_Glyph *fg = NULL; Eina_Inarray *glyphs; size_t unit = 32; Eina_Bool reused_glyphs; @@ -338,8 +338,11 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props) return; error: - if (fg->glyph_out) free(fg->glyph_out); - if (fg) free(fg); + if (fg) + { + if (fg->glyph_out) free(fg->glyph_out); + free(fg); + } eina_inarray_free(glyphs); }