1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

MIME: fix crash with empty File extensions menu

Delete the FREE_LIST flag from mi_no_ext so that free_menu_items doesn't
try to free static memory.

This fixes a crash reproducible by deleting every entry under Setup -> File
extensions, opening said menu, and then closing said menu.

[ From commit b41c7d4055 in ELinks
  0.12.GIT.  --KON ]
This commit is contained in:
Miciah Dashiel Butler Masters 2006-06-15 20:37:20 +00:00 committed by Kalle Olavi Niemitalo
parent 36f987840a
commit 94e153194c

View File

@ -136,7 +136,7 @@ menu_add_ext(struct terminal *term, void *fcp, void *xxx2)
static struct menu_item mi_no_ext[] = {
INIT_MENU_ITEM(N_("No extensions"), NULL, ACT_MAIN_NONE, NULL, NULL, FREE_LIST | NO_SELECT),
INIT_MENU_ITEM(N_("No extensions"), NULL, ACT_MAIN_NONE, NULL, NULL, NO_SELECT),
NULL_MENU_ITEM
};