efl_ui_win: do not error when NULL is setted as content

NULL is valid, and the sub_object code does refuse to allow NULL, hence
we need this check here.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8638
This commit is contained in:
Marcel Hollerbach 2019-04-17 18:52:31 +02:00
parent e9a7da0549
commit 6c9b020a0f
1 changed files with 1 additions and 1 deletions

View File

@ -7547,7 +7547,7 @@ _efl_ui_win_content_set(Eo *obj, Efl_Ui_Win_Data *sd, const char *part, Eo *cont
if (eina_streq(part, "content"))
{
if (sd->content == content) return EINA_TRUE;
if (!elm_widget_sub_object_add(obj, content))
if (content && !elm_widget_sub_object_add(obj, content))
goto err;
/* FIXME: Switch to swallow inside the frame
if (!edje_object_part_swallow(sd->frame_obj, "elm.swallow.client", content))