diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-21 16:42:15 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-21 16:42:15 +0000 |
| commit | 0cceca230318a63daa9ec896575379046f5d3a49 (patch) | |
| tree | efab0e2656a3b6265b035334c4210b126b90c640 /openbox | |
| parent | 556a08cec8ac15bf2d5e0fa8bcff753e3c3ae145 (diff) | |
dont add null actions to the list
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/menu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openbox/menu.c b/openbox/menu.c index e1a2e6d8..cf3fa555 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -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); } |
