evas: don't assume anymore that text_node is != NULL.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 May 2011 09:00:44 +0000 (09:00 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 May 2011 09:00:44 +0000 (09:00 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59231 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index cdd0670..08535ca 100644 (file)
@@ -3162,6 +3162,7 @@ _layout_get_wordwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
       const Evas_Object_Textblock_Text_Item *ti, size_t line_start,
       const char *breaks)
 {
+   if (!ti->parent.text_node) return -1;
    return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_FALSE, line_start,
          breaks);
 }
@@ -3172,6 +3173,7 @@ _layout_get_mixedwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
       const Evas_Object_Textblock_Text_Item *ti, size_t line_start,
       const char *breaks)
 {
+   if (!ti->parent.text_node) return -1;
    return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_TRUE, line_start,
          breaks);
 }
@@ -3403,7 +3405,7 @@ _layout_visualize_par(Ctxt *c)
                        if (!line_breaks)
                          {
                             /* Only relevant in those cases */
-                            if (it->format->wrap_word || it->format->wrap_mixed)
+                            if ((it->format->wrap_word || it->format->wrap_mixed) && it->text_node)
                               {
                                  size_t len =
                                     eina_ustrbuf_length_get(