From 92a67f1a61e79a16eeeb6ac5f68cc286a3d3be72 Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Thu, 30 Jun 2016 14:20:44 +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. --- src/lib/elementary/elm_layout.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c index aabbb56c5e..b6bfc09614 100644 --- a/src/lib/elementary/elm_layout.c +++ b/src/lib/elementary/elm_layout.c @@ -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;