Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_apps.c 


Log Message:
rephorm had a seggie, but not enough information to track down a
solution.  So, just be extra paranoid.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -3 -r1.234 -r1.235
--- e_apps.c    19 Oct 2006 19:37:26 -0000      1.234
+++ e_apps.c    20 Oct 2006 21:31:21 -0000      1.235
@@ -511,6 +511,9 @@
      {
        if (a->monitor) ecore_file_monitor_del(a->monitor);
        if (a->path) evas_stringshare_del(a->path);
+       /* Just going that little extra paranoid, coz rephorm got a strange 
seggie. */
+       a->monitor = NULL;
+       a->path = NULL;
        e_app_fields_empty(a);
        free(a);
      }
@@ -1000,7 +1003,8 @@
         _e_apps_every_app = evas_hash_del(_e_apps_every_app, a->path, a);
        evas_stringshare_del(a->path);
        a->path = evas_stringshare_add(buf);
-        _e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, a->path, 
a);
+       if (a->path)
+           _e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, 
a->path, a);
      }
    _e_app_save_order(a->parent);
    for (l = a->references; l; l = l->next)
@@ -1742,7 +1746,7 @@
    if ( (ext) && ((strcmp(ext, ".desktop") == 0) || (strcmp(ext, ".directory") 
== 0)) )
      {   /* It's a .desktop file. */
        Ecore_Desktop *desktop;
-       
+
        desktop = ecore_desktop_get(path, lang);
        if (desktop)
          {
@@ -2185,18 +2189,22 @@
           {
              char *ext;
 
-             o = e_icon_add(evas);
-             ext = strrchr(a->icon_path, '.');
-             if (ext)
-                {
-                   if (strcmp(ext, ".edj") == 0)
-                      e_icon_file_edje_set(o, a->icon_path, "icon");
-                   else
-                      e_icon_file_set(o, a->icon_path);
-                }
-             else
-                e_icon_file_set(o, a->icon_path);
-             e_icon_fill_inside_set(o, 1);
+             /* Be paranoid. */
+             if (a->icon_path)
+              {
+                  o = e_icon_add(evas);
+                  ext = strrchr(a->icon_path, '.');
+                  if (ext)
+                     {
+                        if (strcmp(ext, ".edj") == 0)
+                           e_icon_file_edje_set(o, a->icon_path, "icon");
+                        else
+                           e_icon_file_set(o, a->icon_path);
+                     }
+                  else
+                     e_icon_file_set(o, a->icon_path);
+                  e_icon_fill_inside_set(o, 1);
+              }
             break;
           }
 
@@ -2242,16 +2250,20 @@
           {
              char *ext;
 
-             ext = strrchr(a->icon_path, '.');
-             if (ext)
-                {
-                    if (strcmp(ext, ".edj") == 0)
-                       e_menu_item_icon_edje_set(mi, a->icon_path, "icon");
-                    else
-                       e_menu_item_icon_file_set(mi, a->icon_path);
-                }
-             else
-                e_menu_item_icon_file_set(mi, a->icon_path);
+             /* Be paranoid. */
+             if (a->icon_path)
+              {
+                  ext = strrchr(a->icon_path, '.');
+                  if (ext)
+                     {
+                         if (strcmp(ext, ".edj") == 0)
+                            e_menu_item_icon_edje_set(mi, a->icon_path, 
"icon");
+                         else
+                            e_menu_item_icon_file_set(mi, a->icon_path);
+                     }
+                  else
+                     e_menu_item_icon_file_set(mi, a->icon_path);
+              }
             break;
           }
 
@@ -2357,6 +2369,9 @@
        e_app_fields_empty(a);
        if (a->path)
          evas_stringshare_del(a->path);
+       /* Just going that little extra paranoid, coz rephorm got a strange 
seggie. */
+       a->monitor = NULL;
+       a->path = NULL;
        free(a);
      }
 }



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to