From 71490cad70e2ad6d3494dc376498cdbd1b9357bb Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 29 Aug 2010 08:27:13 +0000 Subject: [PATCH] Evas textblock: Fixed segfault when clearing a textblock and then trying to delete while it's empty. And fixed cursor position in cases when there's a visible format after a \n SVN revision: 51709 --- legacy/evas/src/lib/canvas/evas_object_textblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 6f4fb213da..88adff94fe 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -3057,7 +3057,7 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_ _layout_text_append(c, fmt, n, start, -1, o->repch); } /* Advance the line so it'll calculate the size */ - if ((c->ln) && (c->ln->items) && (fmt)) + if ((c->ln) && (c->ln->items || c->ln->format_items) && (fmt)) _layout_line_advance(c, fmt); /* Clean the rest of the format stack */ @@ -5975,7 +5975,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) const Eina_Unicode *text; int chr, index, ppos; - if (!cur) return; + if (!cur || !cur->node) return; o = (Evas_Object_Textblock *)(cur->obj->object_data); n = cur->node;