summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-09-19 20:16:59 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-09-20 09:19:33 +0300
commitacd1c409a02026f550ac61d37573692dc6da680f (patch)
treed6e6c36fd632db67b70524865966caf627a5ef9c /src/lib/elementary
parentd44131a3aa220b6482b3eb62e207c8c05c10e02e (diff)
Ui text: add null checks for anchor update
Add null checks in case item was not found. Also use one more emoticon to test the provider.
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_text.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 1875e722a6..da1442e835 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -4805,6 +4805,8 @@ _item_obj_get(Anchor *an, Evas_Object *o, Evas_Object *smart, Evas_Object *clip)
4805 Eo *obj = an->obj; 4805 Eo *obj = an->obj;
4806 Evas_Object *item_obj; 4806 Evas_Object *item_obj;
4807 4807
4808 if (!an->name) return NULL;
4809
4808 EFL_UI_TEXT_DATA_GET(obj, sd); 4810 EFL_UI_TEXT_DATA_GET(obj, sd);
4809 4811
4810 EINA_INLIST_FOREACH(sd->item_objs, io) 4812 EINA_INLIST_FOREACH(sd->item_objs, io)
@@ -5089,12 +5091,16 @@ _anchors_update(Eo *o, Efl_Ui_Text_Data *sd)
5089 an->sel = eina_list_append(an->sel, rect); 5091 an->sel = eina_list_append(an->sel, rect);
5090 5092
5091 ob = _item_obj_get(an, o, smart, clip); 5093 ob = _item_obj_get(an, o, smart, clip);
5092 rect->obj = ob;
5093 5094
5094 efl_text_object_item_geometry_get(an->obj, 5095 if (ob)
5095 an->annotation, &cx, &cy, &cw, &ch); 5096 {
5096 evas_object_move(rect->obj, x + cx, y + cy); 5097 rect->obj = ob;
5097 evas_object_resize(rect->obj, cw, ch); 5098
5099 efl_text_object_item_geometry_get(an->obj,
5100 an->annotation, &cx, &cy, &cw, &ch);
5101 evas_object_move(rect->obj, x + cx, y + cy);
5102 evas_object_resize(rect->obj, cw, ch);
5103 }
5098 } 5104 }
5099 } 5105 }
5100 // for link anchors 5106 // for link anchors