]> Dogcows Code - chaz/openbox/commitdiff
dont add null actions to the list
authorDana Jansens <danakj@orodu.net>
Sun, 21 Sep 2003 16:42:15 +0000 (16:42 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 21 Sep 2003 16:42:15 +0000 (16:42 +0000)
openbox/menu.c

index e1a2e6d82413269583d3171fc4d8aa29de1a3479..cf3fa5551b6c1661e887fb14e3cc708b37c7bb9d 100644 (file)
@@ -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);
         }
This page took 0.022446 seconds and 4 git commands to generate.