Evas font-engine: fix a segfault with empty strings.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 19 Apr 2011 20:27:34 +0000 (20:27 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 19 Apr 2011 20:27:34 +0000 (20:27 +0000)
Thanks to Nicolas Aguirre (captainigloo) for the catch.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@58734 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_draw.c

index e5594cc..166cc2d 100644 (file)
@@ -415,9 +415,9 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
                                int ext_h, RGBA_Font_Int *fi, int im_w, int im_h __UNUSED__)
 {
 #if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   (void) in_text;
-   const Eina_Unicode *text = text_props->info->shaped_text +
-      text_props->text_offset;
+   const Eina_Unicode *text = (text_props->info) ?
+      text_props->info->shaped_text + text_props->text_offset :
+      in_text;
 #else
    const Eina_Unicode *text = in_text;
 #endif