summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2011-02-24 15:18:10 +0000
committerTom Hacohen <tom@stosb.com>2011-02-24 15:18:10 +0000
commit1078e941fa4d8861c706c026f01f8f384b1b1eeb (patch)
tree2412430f553212bb07decf93f047b74f4f2aa983 /legacy
parentc54cc95085482ab2a64eb906e262d2aae282bb10 (diff)
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. SVN revision: 57301
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_textblock.c4
1 files 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 2156d34b61..0f93259129 100644
--- a/legacy/evas/src/lib/canvas/evas_object_textblock.c
+++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c
@@ -2450,7 +2450,7 @@ _layout_item_text_split_strip_white(Ctxt *c,
2450 else 2450 else
2451 cut2 = cut; 2451 cut2 = cut;
2452 2452
2453 if (ts[cut2]) 2453 if (ts[cut2] && (ti->text_props.text_len > 0))
2454 { 2454 {
2455 new_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut2], 2455 new_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut2],
2456 ti->text_props.text_len - cut2); 2456 ti->text_props.text_len - cut2);
@@ -2464,7 +2464,7 @@ _layout_item_text_split_strip_white(Ctxt *c,
2464 _layout_text_add_logical_item(c, new_ti, lti); 2464 _layout_text_add_logical_item(c, new_ti, lti);
2465 } 2465 }
2466 2466
2467 if (cut2 > cut) 2467 if ((cut2 > cut) && (ti->text_props.text_len > 0))
2468 { 2468 {
2469 white_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut], 2469 white_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut],
2470 ti->text_props.text_len - cut); 2470 ti->text_props.text_len - cut);