forked from enlightenment/efl
layout: Add NULL check in _elm_layout_text_set function
When the parameter 'text' is NULL in elm_layout_text_set function, the sub object data with the same part name is removed from the layout's sub object list and the function returns immediately. However, if the text part doesn't exist in the list, a new sub object data is appended to the list even though the text is NULL. This patch adds NULL check so the function can return in such cases.
This commit is contained in:
parent
366b24726c
commit
92a67f1a61
|
@ -1296,6 +1296,8 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const
|
|||
sub_d = NULL;
|
||||
}
|
||||
|
||||
if (!text) return EINA_TRUE;
|
||||
|
||||
if (!edje_object_part_text_escaped_set
|
||||
(wd->resize_obj, part, text))
|
||||
return EINA_FALSE;
|
||||
|
|
Loading…
Reference in New Issue