Evas textblock: Fixed returned position of "clean" cursors.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 10 Jul 2011 12:18:48 +0000 (12:18 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 10 Jul 2011 12:18:48 +0000 (12:18 +0000)
Issue reported by Shilpa.

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

src/lib/canvas/evas_object_textblock.c

index 449973d..e5e6869 100644 (file)
@@ -6237,6 +6237,7 @@ evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur)
    size_t npos = 0;
 
    if (!cur) return -1;
+   if (!cur->node) return 0;
    o = (Evas_Object_Textblock *)(cur->obj->object_data);
    n = o->text_nodes;
    while (n != cur->node)