eunue pushed a commit to branch master.

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

commit e3fd84d1de9885aa05021603a50c0287d21d2765
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Wed Jun 29 16:15:46 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..919b75b 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1300,6 +1300,8 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, 
const char *part, const
          (wd->resize_obj, part, text))
      return EINA_FALSE;
 
+   if (!text) return EINA_TRUE;
+
    if (!sub_d)
      {
         sub_d = ELM_NEW(Elm_Layout_Sub_Object_Data);

-- 


Reply via email to