forked from enlightenment/efl
edje entry - fix coverity CID 1357752
fix potential crash if calloc fails and sel is NULL @fix
This commit is contained in:
parent
10f7641dda
commit
35e39f4145
|
@ -1122,6 +1122,8 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
|
|||
Evas_Object *ob;
|
||||
|
||||
sel = calloc(1, sizeof(Sel));
|
||||
if (sel)
|
||||
{
|
||||
an->sel = eina_list_append(an->sel, sel);
|
||||
|
||||
if (ed->item_provider.func)
|
||||
|
@ -1130,12 +1132,16 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
|
|||
sel->obj = ob;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sel)
|
||||
{
|
||||
/* We have only one sel per item */
|
||||
sel = an->sel->data;
|
||||
evas_object_move(sel->obj, x + cx, y + cy);
|
||||
evas_object_resize(sel->obj, cw, ch);
|
||||
evas_object_show(sel->obj);
|
||||
}
|
||||
}
|
||||
// for link anchors
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue