- If its not really edj, or if its corrupt dont crash

- Collect the error message now. should we just check for NULL when setting?


SVN revision: 17777
This commit is contained in:
stffrdhrn 2005-10-23 00:15:45 +00:00 committed by stffrdhrn
parent 7de1083877
commit c45a3f58b5
1 changed files with 27 additions and 18 deletions

View File

@ -387,9 +387,12 @@ edje_file_collection_list(const char *file)
{
Evas_List *lst = NULL;
Edje_File *edf;
int error_ret = 0;
if ((!file) || (!*file)) return NULL;
edf = _edje_cache_file_coll_open((char *)file, NULL, NULL, NULL);
edf = _edje_cache_file_coll_open((char *)file, NULL, &error_ret, NULL);
if (edf != NULL)
{
if (edf->collection_dir)
{
Evas_List *l;
@ -403,6 +406,7 @@ edje_file_collection_list(const char *file)
}
}
_edje_cache_file_unref(edf);
}
return lst;
}
@ -434,8 +438,11 @@ edje_file_data_get(const char *file, const char *key)
Edje_File *edf;
Evas_List *l;
char *str = NULL;
int error_ret = 0;
edf = _edje_cache_file_coll_open((char *)file, NULL, NULL, NULL);
edf = _edje_cache_file_coll_open((char *)file, NULL, &error_ret, NULL);
if (edf != NULL)
{
for (l = edf->data; l; l = l->next)
{
Edje_Data *di;
@ -446,8 +453,10 @@ edje_file_data_get(const char *file, const char *key)
str = strdup(di->value);
break;
}
}
_edje_cache_file_unref(edf);
}
return str;
}