Evas textblock: It's ok to have an empty item when there are no nodes. - Fixed a...
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:35:30 +0000 (10:35 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:35:30 +0000 (10:35 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56445 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index da02e5c..6558b18 100644 (file)
@@ -2477,12 +2477,15 @@ _layout_text_add_and_split_item(Ctxt *c, Evas_Object_Textblock_Format *fmt,
    do
      {
         Evas_Object_Textblock_Text_Item *new_ti;
-        cutoff = evas_bidi_end_of_run_get(ti->parent.text_node->bidi_props,
-              ti->parent.text_pos, len);
-        if (cutoff > 0)
+        if (ti->parent.text_node)
           {
-             new_ti = _layout_text_item_new(c, fmt, ti->text + cutoff);
-             _layout_item_text_cutoff(c, ti, cutoff);
+             cutoff = evas_bidi_end_of_run_get(ti->parent.text_node->bidi_props,
+                   ti->parent.text_pos, len);
+             if (cutoff > 0)
+               {
+                  new_ti = _layout_text_item_new(c, fmt, ti->text + cutoff);
+                  _layout_item_text_cutoff(c, ti, cutoff);
+               }
           }
 #endif