forked from enlightenment/efl
- 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:
parent
7de1083877
commit
c45a3f58b5
|
@ -387,22 +387,26 @@ edje_file_collection_list(const char *file)
|
||||||
{
|
{
|
||||||
Evas_List *lst = NULL;
|
Evas_List *lst = NULL;
|
||||||
Edje_File *edf;
|
Edje_File *edf;
|
||||||
|
int error_ret = 0;
|
||||||
|
|
||||||
if ((!file) || (!*file)) return NULL;
|
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->collection_dir)
|
if (edf != NULL)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
if (edf->collection_dir)
|
||||||
|
|
||||||
for (l = edf->collection_dir->entries; l; l = l->next)
|
|
||||||
{
|
{
|
||||||
Edje_Part_Collection_Directory_Entry *ce;
|
Evas_List *l;
|
||||||
|
|
||||||
|
for (l = edf->collection_dir->entries; l; l = l->next)
|
||||||
|
{
|
||||||
|
Edje_Part_Collection_Directory_Entry *ce;
|
||||||
|
|
||||||
ce = l->data;
|
ce = l->data;
|
||||||
lst = evas_list_append(lst, strdup(ce->entry));
|
lst = evas_list_append(lst, strdup(ce->entry));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
_edje_cache_file_unref(edf);
|
||||||
}
|
}
|
||||||
_edje_cache_file_unref(edf);
|
|
||||||
return lst;
|
return lst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,20 +438,25 @@ edje_file_data_get(const char *file, const char *key)
|
||||||
Edje_File *edf;
|
Edje_File *edf;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
char *str = NULL;
|
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);
|
||||||
for (l = edf->data; l; l = l->next)
|
if (edf != NULL)
|
||||||
{
|
{
|
||||||
Edje_Data *di;
|
for (l = edf->data; l; l = l->next)
|
||||||
|
|
||||||
di = l->data;
|
|
||||||
if (!strcmp(di->key, key))
|
|
||||||
{
|
{
|
||||||
str = strdup(di->value);
|
Edje_Data *di;
|
||||||
break;
|
|
||||||
|
di = l->data;
|
||||||
|
if (!strcmp(di->key, key))
|
||||||
|
{
|
||||||
|
str = strdup(di->value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
_edje_cache_file_unref(edf);
|
||||||
}
|
}
|
||||||
_edje_cache_file_unref(edf);
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue