Enlightenment CVS committal

Author  : handyande
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        icon.c 


Log Message:
Try to combat strange closures of engage
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- icon.c      24 Apr 2004 19:09:36 -0000      1.24
+++ icon.c      26 Apr 2004 12:59:36 -0000      1.25
@@ -394,20 +394,19 @@
 #endif
   while (item) {
     if (strcmp(winclass, (char *) item->data) == 0) {
-      *name = (char *) item->next->data;
-      *icon_name = (char *) item->next->next->data;
+      if (item->next) {
+        *name = (char *) item->next->data;
+        if (item->next->next) {
+          *icon_name = (char *) item->next->next->data;
+        } else {
+          fprintf(stderr, "corrupt icon mapping for %s (icon_name)\n",winclass);
+        }
+      } else {
+        fprintf(stderr, "corrupt icon mapping for %s (name)\n", winclass);
+      }
       return;
     }
-
-    if (!(item = item->next)) {
-      fprintf(stderr, "corrupt icon mappings, pos 1\n");
-      exit(EXIT_FAILURE);
-    }
-    if (!(item = item->next)) {
-      fprintf(stderr, "corrupt icon mappings, pos 2\n");
-      exit(EXIT_FAILURE);
-    }
-    item = item->next;
+    item = item->next; 
   }
   *name = strdup(winclass);
   *icon_name = strdup(winclass);




-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to