fix for clients that set a custom_main_menu (A. Foss)

This commit is contained in:
marschap
2006-05-05 16:45:22 +00:00
parent f3dd32f62a
commit 6343757209
+6
View File
@@ -39,6 +39,9 @@
#include "screen.h"
#include "widget.h"
extern Menu * custom_main_menu;
/** Basicly a patched version of LL_GetByIndex() that ignores hidden
* entries completely. (But it takes a menu as an argument.) */
static void *
@@ -137,6 +140,9 @@ menu_destroy (Menu *menu)
if (menu == NULL)
return;
if (custom_main_menu == menu)
custom_main_menu = NULL;
menu_destroy_all_items (menu);
LL_Destroy (menu->data.menu.contents);
menu->data.menu.contents = NULL;