dont add null actions to the list
This commit is contained in:
parent
556a08cec8
commit
0cceca2303
1 changed files with 6 additions and 4 deletions
|
@ -176,10 +176,12 @@ static void parse_menu_item(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
|
|||
GSList *acts = NULL;
|
||||
|
||||
for (node = node->children; node; node = node->next)
|
||||
if (!xmlStrcasecmp(node->name, (const xmlChar*) "action"))
|
||||
acts = g_slist_append(acts, action_parse
|
||||
(i, doc, node,
|
||||
OB_USER_ACTION_MENU_SELECTION));
|
||||
if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) {
|
||||
ObAction *a = action_parse
|
||||
(i, doc, node, OB_USER_ACTION_MENU_SELECTION);
|
||||
if (a)
|
||||
acts = g_slist_append(acts, a);
|
||||
}
|
||||
menu_add_normal(state->parent, -1, label, acts);
|
||||
g_free(label);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue