From f6129640eaa41cb2f9d9bebf23a53c16b0d8e4e5 Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Wed, 15 Feb 2017 19:55:52 +0900 Subject: [PATCH] evas: fix crash issue due to wrongly created new line A line's min text pos could have previous invisible (visually deleted) item's text pos. Because of this, Textblock could create empty new line. When Textblock's cursor tried to move on the empty line, process will be crashed. @tizen_fix Change-Id: Id32f4d950839646ce7eda4804d7335762a4d6065 --- src/lib/evas/canvas/evas_object_textblock.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index bd845a0..68715ac 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -5307,12 +5307,6 @@ _layout_par(Ctxt *c) it = _ITEM(eina_list_data_get(i)); - /* TIZEN_ONLY(20170201): Fix RTL + LTR word wrap issue caused by wrong line start pos */ - if ((c->ln_min_text_pos == -1) || - (c->ln_min_text_pos > it->text_pos)) - c->ln_min_text_pos = it->text_pos; - /* END */ - /* Skip visually deleted items */ if (it->visually_deleted || ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && !it->format->font.font)) @@ -5325,6 +5319,12 @@ _layout_par(Ctxt *c) continue; } + /* TIZEN_ONLY(20170201): Fix RTL + LTR word wrap issue caused by wrong line start pos */ + if ((c->ln_min_text_pos == -1) || + (c->ln_min_text_pos > it->text_pos)) + c->ln_min_text_pos = it->text_pos; + /* END */ + it->x = c->x; if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) { -- 2.7.4