* edje: add some error detection.

SVN revision: 50939
This commit is contained in:
Cedric BAIL 2010-08-09 18:22:48 +00:00
parent 415b06bf48
commit f3894fdd27
1 changed files with 13 additions and 0 deletions

View File

@ -1004,6 +1004,13 @@ data_write(void)
int font_num = 0;
int collection_num = 0;
if (!edje_file)
{
ERR("%s: Error. No data to put in \"%s\"",
progname, file_out);
exit(-1);
}
ef = eet_open(file_out, EET_FILE_MODE_WRITE);
if (!ef)
{
@ -1017,6 +1024,12 @@ data_write(void)
new_edje_file = _edje_file_convert(ef, edje_file);
_edje_file_set(new_edje_file);
if (!new_edje_file)
{
ERR("%s: Error convertion failed for \"%s\"", progname, file_out);
exit(-1);
}
/* convert old structure to new one */
it = eina_hash_iterator_data_new(new_edje_file->collection);