Evas text/textblock: Check we actually found a font instance.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 30 May 2011 08:42:26 +0000 (08:42 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 30 May 2011 08:42:26 +0000 (08:42 +0000)
Currently we only check we have a font_set which is not enough.
Having a fontset and not having an fi should never happen, but it can.

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

src/lib/canvas/evas_object_text.c
src/lib/canvas/evas_object_textblock.c

index aa7d84e..4bf7397 100644 (file)
@@ -471,7 +471,7 @@ _evas_object_text_item_new(Evas_Object *obj, Evas_Object_Text *o,
          it->text_pos);
    evas_common_text_props_script_set(&it->text_props, script);
 
-   if (o->font)
+   if (fi)
      {
         ENFN->font_text_props_info_create(ENDT,
               fi, str + pos, &it->text_props,
index d56ff50..388ee7c 100644 (file)
@@ -2862,7 +2862,7 @@ skip:
                    c->par->bidi_props, ti->parent.text_pos);
              evas_common_text_props_script_set(&ti->text_props, script);
 
-             if (ti->parent.format->font.font)
+             if (cur_fi)
                {
                   c->ENFN->font_text_props_info_create(c->ENDT,
                         cur_fi, str, &ti->text_props, c->par->bidi_props,