forked from enlightenment/efl
elm_entry: add null check logic on elm_entry_text_set API
Summary: If current_text is NULL, a segmentation fault is occured. Test Plan: N/A Reviewers: cedric, Hermet, Jaehyun_Cho, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9780
This commit is contained in:
parent
3b3889bdb5
commit
bbd213bcfb
|
@ -3365,7 +3365,7 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e
|
|||
|
||||
/* If old and new text are the same do nothing */
|
||||
current_text = edje_object_part_text_get(sd->entry_edje, "elm.text");
|
||||
if (current_text == entry || !strcmp(entry, current_text))
|
||||
if (eina_streq(current_text, entry))
|
||||
goto done;
|
||||
|
||||
ELM_SAFE_FREE(sd->text, eina_stringshare_del);
|
||||
|
|
Loading…
Reference in New Issue