eunue pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=92a67f1a61e79a16eeeb6ac5f68cc286a3d3be72

commit 92a67f1a61e79a16eeeb6ac5f68cc286a3d3be72
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Thu Jun 30 14:20:44 2016 +0900

    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 aabbb56..b6bfc09 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;

-- 


Reply via email to