forked from enlightenment/efl
elm_theme: check whether object is valid before calling edje_object_mmap_set
Summary: In Issue scenario when _elm_theme_set was called,object was already deleted by app causing unnecessary addition of the style in style_not_found list. Check for object validity, if object is NULL return theme apply failed. Test Plan: Make object pointer NULL before _elm_theme_set is called. Reviewers: cedric, shilpasingh Subscribers: rajeshps, govi, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4840 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
77e19c7194
commit
7c368923a1
|
@ -301,7 +301,7 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou
|
|||
Eina_File *file;
|
||||
char buf2[1024];
|
||||
|
||||
if ((!clas) || (!group) || (!style)) return EINA_FALSE;
|
||||
if ((!clas) || (!group) || (!style) || !o) return ELM_THEME_APPLY_FAILED;
|
||||
if (!th) th = &(theme_default);
|
||||
snprintf(buf2, sizeof(buf2), "elm/%s/%s/%s", clas, group, style);
|
||||
if (!eina_hash_find(th->cache_style_load_failed, buf2))
|
||||
|
|
Loading…
Reference in New Issue