From 0bc47671c51e9c2056d112107254f9b304f26990 Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Wed, 29 Jun 2016 18:28:54 +0900 Subject: [PATCH] [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. Change-Id: Ia3a26864acc7139e530839b542ba00fc454667a8 Signed-off-by: Jaeun Choi --- src/lib/elm_layout.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c index f4d928c..ab84a4a 100644 --- a/src/lib/elm_layout.c +++ b/src/lib/elm_layout.c @@ -1162,6 +1162,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; -- 2.7.4