Added some safety traps to help avoid segfaults.

SVN revision: 27566
This commit is contained in:
Christopher Michael 2006-12-26 05:06:11 +00:00
parent 06ea50650b
commit 50c184fbf1
1 changed files with 2 additions and 0 deletions

View File

@ -934,8 +934,10 @@ _ecore_desktop_menu_unxml_rules(Ecore_Desktop_Tree * rules,
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) */