[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:
parent
11cde53108
commit
2ce746e7dd
@ -309,9 +309,15 @@ reread_entries (ShellAppSystem *self,
|
|||||||
g_slist_free (*cache);
|
g_slist_free (*cache);
|
||||||
*cache = NULL;
|
*cache = NULL;
|
||||||
|
|
||||||
|
if (!trunk)
|
||||||
|
{
|
||||||
|
*cache = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
*cache = gather_entries_recurse (self, *cache, unique, trunk);
|
*cache = gather_entries_recurse (self, *cache, unique, trunk);
|
||||||
|
|
||||||
gmenu_tree_item_unref (trunk);
|
gmenu_tree_item_unref (trunk);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user