[ShellAppSystem] Don't crash if the menu system is empty

This is a bit pathological, but if your menu tree is empty, we
shouldn't crash.
This commit is contained in:
Colin Walters 2010-05-20 17:06:30 -04:00
parent 11cde53108
commit 2ce746e7dd

View File

@ -309,10 +309,16 @@ reread_entries (ShellAppSystem *self,
g_slist_free (*cache);
*cache = NULL;
if (!trunk)
{
*cache = NULL;
}
else
{
*cache = gather_entries_recurse (self, *cache, unique, trunk);
gmenu_tree_item_unref (trunk);
}
}
static void
cache_by_id (ShellAppSystem *self, GSList *apps)