forked from enlightenment/efl
Evas textblock: Fix seg with empty textblocks that cause wrapping.
Revert "evas: don't assume anymore that text_node is != NULL." This reverts commit 59231 Thanks to cedric for the report + initial fix. SVN revision: 59237
This commit is contained in:
parent
a68c149866
commit
2d0304019d
|
@ -3162,7 +3162,6 @@ _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);
|
||||
}
|
||||
|
@ -3173,7 +3172,6 @@ _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);
|
||||
}
|
||||
|
@ -3381,8 +3379,10 @@ _layout_visualize_par(Ctxt *c)
|
|||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
else if (it->format->wrap_word || it->format->wrap_char ||
|
||||
it->format->wrap_mixed)
|
||||
/* If we want to wrap and it's worth checking for wrapping
|
||||
* (i.e there's actually text). */
|
||||
else if ((it->format->wrap_word || it->format->wrap_char ||
|
||||
it->format->wrap_mixed) && it->text_node)
|
||||
{
|
||||
if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
|
||||
{
|
||||
|
@ -3405,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) && it->text_node)
|
||||
if (it->format->wrap_word || it->format->wrap_mixed)
|
||||
{
|
||||
size_t len =
|
||||
eina_ustrbuf_length_get(
|
||||
|
|
Loading…
Reference in New Issue