theme: ensure group exists in file before using it

This commit is contained in:
Boris Faure 2020-11-26 22:50:37 +01:00
parent dcb43054e9
commit 71f54ad7d6
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
1 changed files with 4 additions and 2 deletions

View File

@ -72,14 +72,16 @@ theme_apply(Evas_Object *obj,
{
edje = elm_layout_edje_get(obj);
if (elm_layout_file_set(obj, theme_path, group))
if ((edje_file_group_exists(theme_path, group) == EINA_TRUE) &&
(elm_layout_file_set(obj, theme_path, group)))
goto done;
if (elm_layout_file_set(obj, theme_path_default_get(), group))
goto done;
}
else
{
if (edje_object_file_set(edje, theme_path, group))
if ((edje_file_group_exists(theme_path, group) == EINA_TRUE) &&
(edje_object_file_set(edje, theme_path, group)))
goto done;
if (edje_object_file_set(edje, theme_path_default_get(), group))
goto done;