elc_naviframe: fix crash in strcmp, if text_set is NULL issue
Summary: Issue: If text set is NULL to naviframe, crash happens in strcmp Soln: Check for text if NULL, before passing to strcmp @fix Test Plan: //Pass the text as NULL elm_object_part_text_set(nf, "title", NULL); Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3052 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
60ff0a3c6e
commit
2ad050a5bc
|
@ -1018,12 +1018,16 @@ EOLIAN static Eina_Bool
|
|||
_elm_naviframe_elm_layout_text_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part, const char *label)
|
||||
{
|
||||
Elm_Object_Item *it;
|
||||
const char *text = NULL;
|
||||
|
||||
it = elm_naviframe_top_item_get(obj);
|
||||
if (!it) return EINA_FALSE;
|
||||
|
||||
elm_object_item_part_text_set(it, part, label);
|
||||
return !strcmp(elm_object_item_part_text_get(it, part), label);
|
||||
text = elm_object_item_part_text_get(it, part);
|
||||
if ((text) && !strcmp(text, label))
|
||||
return EINA_TRUE;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static const char*
|
||||
|
|
Loading…
Reference in New Issue