cedric pushed a commit to branch master.

commit bb4e7fb86984457c3df0cd7a7fb4c9d6e17e3b92
Author: Jean-Philippe Andre <[email protected]>
Date:   Tue Jul 2 15:18:19 2013 +0900

    evas: fix compilation warning in evas_font_draw.
    
    Signed-off-by: Cedric Bail <[email protected]>
---
 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 cea367a..5b8423d 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);
 }
 

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to