seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=44e97a3bfa4df727ca360e359f2b4f0372f12f6b

commit 44e97a3bfa4df727ca360e359f2b4f0372f12f6b
Author: Daniel Juyung Seo <juyung....@samsung.com>
Date:   Mon Dec 23 14:49:50 2013 +0900

    theme: Check the return value of _elm_theme_group_file_find() and do not
    pass NULL to eina_file_filename_get().
    
    eina_file_filename_get() spits unnecessary eina error when the parameter
    is null. In this case, we need to check the return of
    _elm_theme_group_file_find() and do not call eina_file_filename_get()
        when the return is null. One should check the return of
        elm_theme_group_path_find().
    Thank zmike for pointing this out.
---
 src/lib/elm_theme.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c
index 7dea91e..914849d 100644
--- a/src/lib/elm_theme.c
+++ b/src/lib/elm_theme.c
@@ -856,8 +856,13 @@ EAPI const char *
 elm_theme_group_path_find(Elm_Theme *th, const char *group)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(group, NULL);
+   Eina_File *th_file = NULL;
    if (!th) th = &(theme_default);
-   return eina_file_filename_get(_elm_theme_group_file_find(th, group));
+
+   th_file = _elm_theme_group_file_find(th, group);
+   if (th_file)
+     return eina_file_filename_get(th_file);
+   return NULL;
 }
 
 static Eina_List *

-- 


Reply via email to