From 5b00b07d1a32fd3fdcfdd74d4206097e401358e5 Mon Sep 17 00:00:00 2001 From: tasn Date: Thu, 11 Aug 2011 06:58:53 +0000 Subject: [PATCH] Evas textblock: Fixed bug in range_formats get. 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 | 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 4a4e9a9..d7a6e29 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -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) -- 2.7.4