evas: fix compilation warning in evas_font_draw.
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 2 Jul 2013 06:18:19 +0000 (15:18 +0900)
committerCedric Bail <cedric.bail@samsung.com>
Tue, 2 Jul 2013 07:58:10 +0000 (16:58 +0900)
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
src/lib/evas/common/evas_font_draw.c

index cea367a..5b8423d 100644 (file)
@@ -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);
 }