theme: ensure group exists in file before using it

terminology-1.9
Boris Faure 3 years ago
parent dcb43054e9
commit 71f54ad7d6
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
  1. 6
      src/bin/theme.c

@ -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;

Loading…
Cancel
Save