From d6cf590e5e945d143d3aad03babc2bb202287db2 Mon Sep 17 00:00:00 2001 From: tasn Date: Sun, 30 Jan 2011 10:31:45 +0000 Subject: [PATCH] Evas textblock: Added a segfault fix in case (shouldn't happen) it isn't found. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56410 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 434a5c6..423f9d7 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -6853,6 +6853,10 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C if (!o->formatted.valid) _relayout(cur->obj); previous_format = _find_layout_item_match(cur, &ln, &it); + if (!it) + { + return -1; + } if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) { ti = _ITEM_TEXT(it); -- 2.7.4