]> Dogcows Code - chaz/openbox/blobdiff - plugins/menu/fifo_menu.c
* Change xml parsing to pass the parent node, rather than the first
[chaz/openbox] / plugins / menu / fifo_menu.c
index 71326225974ec18d5a49ea54cc13f78ccce96226..3443294e2ced983b66c85e424956c6a71056bfb2 100644 (file)
@@ -133,6 +133,11 @@ void plugin_destroy (ObMenu *m)
         FIFO_MENU_DATA(m)->fifo = NULL;
     }
 
+    if (FIFO_MENU_DATA(m)->buf != NULL) {
+        g_free(FIFO_MENU_DATA(m)->buf);
+        FIFO_MENU_DATA(m)->buf = NULL;
+    }
     g_free(m->plugin_data);
 
     menu_free(m->name);
@@ -162,9 +167,11 @@ void *plugin_create(PluginMenuCreateData *data)
     m = menu_new( (label != NULL ? label : ""),
                   (id != NULL ? id : PLUGIN_NAME),
                   data->parent);
-    menu_add_entry(data->parent, menu_entry_new_submenu(
-                       (label != NULL ? label : ""),
-                       m));
+
+    if (data->parent)
+        menu_add_entry(data->parent, menu_entry_new_submenu(
+                           (label != NULL ? label : ""),
+                           m));
 
     g_free(label);
     g_free(id);
This page took 0.024094 seconds and 4 git commands to generate.