Evas textblock: Fixed bug in range_formats get.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 11 Aug 2011 06:58:53 +0000 (06:58 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 11 Aug 2011 06:58:53 +0000 (06:58 +0000)
Thanks to Sanjeev for the rebort.

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

src/lib/canvas/evas_object_textblock.c

index 4a4e9a9..d7a6e29 100644 (file)
@@ -7496,6 +7496,10 @@ evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const
    /* FIXME: Change first and last getting to format_before_or_at_pos_get */
 
    last = n2->format_node;
+
+   /* If n2->format_node is NULL, we don't have formats in the tb/range. */
+   if (!last)
+      return NULL;
    /* If the found format is on our text node, we should go to the last
     * one, otherwise, the one we found is good enough. */
    if (last->text_node == n2)