Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : libs/edje

Dir     : e17/libs/edje/src/bin


Modified Files:
        edje_cc_out.c 


Log Message:
Don't segfault on empty file.

===================================================================
RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_out.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- edje_cc_out.c       26 Aug 2007 12:54:51 -0000      1.57
+++ edje_cc_out.c       15 Sep 2007 08:46:34 -0000      1.58
@@ -521,15 +521,18 @@
      }
 
    /* 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 */



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to