Don't segfault on empty file.

SVN revision: 31721
This commit is contained in:
Sebastian Dransfeld 2007-09-15 08:46:34 +00:00
parent bc1add673e
commit 5b85440817
1 changed files with 10 additions and 7 deletions

View File

@ -521,15 +521,18 @@ data_write(void)
}
/* check that all groups have names */
for (l = edje_file->collection_dir->entries; l; l = l->next)
if (edje_file->collection_dir)
{
Edje_Part_Collection_Directory_Entry *de;
de = l->data;
if (!de->entry)
for (l = edje_file->collection_dir->entries; l; l = l->next)
{
fprintf(stderr, "%s: Error. collection %i: name missing.\n",
progname, de->id);
ABORT_WRITE(ef, file_out);
Edje_Part_Collection_Directory_Entry *de;
de = l->data;
if (!de->entry)
{
fprintf(stderr, "%s: Error. collection %i: name missing.\n",
progname, de->id);
ABORT_WRITE(ef, file_out);
}
}
}
/* check that all spectra are valid */