From: tasn Date: Thu, 24 Feb 2011 15:18:10 +0000 (+0000) Subject: Evas textblock: Added a workaround for a segfault. X-Git-Tag: 2.0_alpha~240^2~984 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a293f23c75273f32980273f50d81770005661f1d;p=framework%2Fuifw%2Fevas.git Evas textblock: Added a workaround for a segfault. The problem is that we currently do try to split even if we can't. We should overview things and fix it in a more proper way, but this is a good enough solution in the meanwhile, because this part will be fixed soon. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@57301 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 2156d34..0f93259 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -2450,7 +2450,7 @@ _layout_item_text_split_strip_white(Ctxt *c, else cut2 = cut; - if (ts[cut2]) + if (ts[cut2] && (ti->text_props.text_len > 0)) { new_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut2], ti->text_props.text_len - cut2); @@ -2464,7 +2464,7 @@ _layout_item_text_split_strip_white(Ctxt *c, _layout_text_add_logical_item(c, new_ti, lti); } - if (cut2 > cut) + if ((cut2 > cut) && (ti->text_props.text_len > 0)) { white_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut], ti->text_props.text_len - cut);