Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_desktop


Modified Files:
        ecore_desktop_menu.c 


Log Message:
Added some safety traps to help avoid segfaults.

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop_menu.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- ecore_desktop_menu.c        21 Dec 2006 14:42:20 -0000      1.40
+++ ecore_desktop_menu.c        26 Dec 2006 05:06:11 -0000      1.41
@@ -934,8 +934,10 @@
    int                 i;
    char                temp[PATH_MAX];
 
+   if (!tree) return;
    for (i = 0; i < tree->size; i++)
      {
+       if (!tree->elements[i]) continue;
        if (tree->elements[i].type == ECORE_DESKTOP_TREE_ELEMENT_TYPE_STRING)
          {
              /* FIXME <All /> or <All foo="bar"> would be valid input (which 
this won't catch) */



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to