summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-10-29 17:00:48 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-10-31 11:02:28 +0900
commite9614a9fddbc80da7061aae47b0e4f9cea1282e6 (patch)
treedb2921eae49ed3a0a56ef6414c70e485e3a8f746 /src
parent1eb85fe7468d5847624e430c755b440ffa43e510 (diff)
evas: fix uninitialized use of font instance when no font is selected.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_text.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 5dc38a85b9..5922d1b673 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -641,9 +641,9 @@ static const Eina_Unicode _ellip_str[2] = { 0x2026, '\0' };
641static Evas_Object_Text_Item * 641static Evas_Object_Text_Item *
642_layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Object_Text *o) 642_layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Object_Text *o)
643{ 643{
644 Evas_Object_Text_Item *ellip_ti; 644 Evas_Object_Text_Item *ellip_ti = NULL;
645 Evas_Script_Type script; 645 Evas_Script_Type script;
646 Evas_Font_Instance *script_fi = NULL, *cur_fi; 646 Evas_Font_Instance *script_fi = NULL, *cur_fi = NULL;
647 size_t len = 1; /* The length of _ellip_str */ 647 size_t len = 1; /* The length of _ellip_str */
648 648
649 script = evas_common_language_script_type_get(_ellip_str, 1); 649 script = evas_common_language_script_type_get(_ellip_str, 1);
@@ -652,11 +652,10 @@ _layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Object_Text *o)
652 { 652 {
653 (void) ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi, 653 (void) ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi,
654 script, _ellip_str, 1); 654 script, _ellip_str, 1);
655 ellip_ti = _evas_object_text_item_new(obj, o, cur_fi,
656 _ellip_str, script, 0, 0, len);
655 } 657 }
656 658
657 ellip_ti = _evas_object_text_item_new(obj, o, cur_fi,
658 _ellip_str, script, 0, 0, len);
659
660 return ellip_ti; 659 return ellip_ti;
661} 660}
662 661