fix for clients that set a custom_main_menu (A. Foss)
This commit is contained in:
@@ -39,6 +39,9 @@
|
|||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern Menu * custom_main_menu;
|
||||||
|
|
||||||
/** Basicly a patched version of LL_GetByIndex() that ignores hidden
|
/** Basicly a patched version of LL_GetByIndex() that ignores hidden
|
||||||
* entries completely. (But it takes a menu as an argument.) */
|
* entries completely. (But it takes a menu as an argument.) */
|
||||||
static void *
|
static void *
|
||||||
@@ -137,6 +140,9 @@ menu_destroy (Menu *menu)
|
|||||||
if (menu == NULL)
|
if (menu == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (custom_main_menu == menu)
|
||||||
|
custom_main_menu = NULL;
|
||||||
|
|
||||||
menu_destroy_all_items (menu);
|
menu_destroy_all_items (menu);
|
||||||
LL_Destroy (menu->data.menu.contents);
|
LL_Destroy (menu->data.menu.contents);
|
||||||
menu->data.menu.contents = NULL;
|
menu->data.menu.contents = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user