summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--NEWS2
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c5
-rw-r--r--src/tests/evas/evas_test_textblock.c7
4 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 38c2abe92f..ce224f9e43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12013-06-25 Tom Hacohen
2
3 * Evas textblock: Fixed issue with textblocks without fonts
4 segfaulting.
5
12013-06-24 Cedric Bail 62013-06-24 Cedric Bail
2 7
3 * Evas: add support for asynchronously uploading GL texture. 8 * Evas: add support for asynchronously uploading GL texture.
diff --git a/NEWS b/NEWS
index 228e5277e5..f5afb226a7 100644
--- a/NEWS
+++ b/NEWS
@@ -339,4 +339,4 @@ Fixes:
339 * Evas: Fix gif cannot decode alpha value correctly. 339 * Evas: Fix gif cannot decode alpha value correctly.
340 * Evas: Fix bs if app call image object update add after call api like fileset. 340 * Evas: Fix bs if app call image object update add after call api like fileset.
341 * Evas: Fix evas_gl direct rendering to support partial redraw. 341 * Evas: Fix evas_gl direct rendering to support partial redraw.
342 342 * Evas textblock: Fixed issue with textblocks without fonts segfaulting.
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 4ac813dff0..88d1fa4f9e 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2550,6 +2550,11 @@ _layout_item_ascent_descent_adjust(const Evas_Object *eo_obj,
2550 Evas_Coord *maxascent, Evas_Coord *maxdescent, 2550 Evas_Coord *maxascent, Evas_Coord *maxdescent,
2551 Evas_Object_Textblock_Item *it, Textblock_Position position) 2551 Evas_Object_Textblock_Item *it, Textblock_Position position)
2552{ 2552{
2553 if (!it->format || !it->format->font.font)
2554 {
2555 return;
2556 }
2557
2553 _layout_format_ascent_descent_adjust(eo_obj, maxascent, maxdescent, it->format); 2558 _layout_format_ascent_descent_adjust(eo_obj, maxascent, maxdescent, it->format);
2554 2559
2555 if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && 2560 if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index ca6644daaf..03332b497d 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2484,6 +2484,13 @@ START_TEST(evas_textblock_style)
2484 evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); 2484 evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b);
2485 fail_if((l != 1) || (r != 4) || (t != 1) || (b != 4)); 2485 fail_if((l != 1) || (r != 4) || (t != 1) || (b != 4));
2486 2486
2487 /* No font */
2488 evas_textblock_style_set(newst, "DEFAULT=''");
2489 evas_object_textblock_text_markup_set(tb, "Test");
2490 evas_object_textblock_size_formatted_get(tb, &nw, &nh);
2491 ck_assert_int_eq(nw, 0);
2492 ck_assert_int_eq(nw, nh);
2493
2487 END_TB_TEST(); 2494 END_TB_TEST();
2488} 2495}
2489END_TEST 2496END_TEST