Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/edje

Dir     : e17/libs/edje/src/bin


Modified Files:
        edje_cc_out.c 


Log Message:
fixed a potential NULL pointer deref
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc_out.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- edje_cc_out.c       12 Aug 2004 18:55:38 -0000      1.19
+++ edje_cc_out.c       29 Aug 2004 09:40:02 -0000      1.20
@@ -1,3 +1,7 @@
+/*
+ * vim:ts=8:sw=3:sts=3:noexpandtab
+ */
+
 #include "edje_cc.h"
 
 typedef struct _Part_Lookup Part_Lookup;
@@ -685,17 +689,23 @@
        
        il = image_lookups->data;
        
-       for (l = edje_file->image_dir->entries; l; l = l->next)
-         {
-            Edje_Image_Directory_Entry *de;
-            
-            de = l->data;
-            if ((de->entry) && (!strcmp(de->entry, il->name)))
-              {
-                 *(il->dest) = de->id;
-                 break;
-              }
-         }
+       if (!edje_file->image_dir)
+          l = NULL;
+       else
+       {
+          for (l = edje_file->image_dir->entries; l; l = l->next)
+          {
+             Edje_Image_Directory_Entry *de;
+
+             de = l->data;
+             if ((de->entry) && (!strcmp(de->entry, il->name)))
+             {
+                *(il->dest) = de->id;
+                break;
+             }
+          }
+       }
+
        if (!l)
          {
             fprintf(stderr, "%s: Error. unable find image name %s\n",




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to