From: Dana Jansens Date: Tue, 25 Jan 2011 18:40:56 +0000 (-0500) Subject: don't free the linkbase on reconfigure X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=a3e1dd09641d9517c5ff6e115cbbe97ea1c0a8ca;p=dana%2Fopenbox.git don't free the linkbase on reconfigure the menu does get freed, so don't free it with the menu. --- diff --git a/openbox/apps_menu.c b/openbox/apps_menu.c index d46ba6ed..7e5fb709 100644 --- a/openbox/apps_menu.c +++ b/openbox/apps_menu.c @@ -35,12 +35,6 @@ static ObMenu *apps_menu; static ObtLinkBase *linkbase; static gboolean dirty; -static void self_destroy(ObMenu *menu, gpointer data) -{ - obt_linkbase_unref(linkbase); - linkbase = NULL; -} - static void self_cleanup(ObMenu *menu, gpointer data) { menu_clear_entries(menu); @@ -111,10 +105,14 @@ void apps_menu_startup(gboolean reconfig) menu_set_update_func(apps_menu, self_update); menu_set_cleanup_func(apps_menu, self_cleanup); menu_set_execute_func(apps_menu, menu_execute); - menu_set_destroy_func(apps_menu, self_destroy); } void apps_menu_shutdown(gboolean reconfig) { + if (!reconfig) { + obt_linkbase_unref(linkbase); + linkbase = NULL; + } + /* freed by the hash table */ }