Now freeing previous menu list upon menu loading if any

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Polonkai Gergely 2012-05-21 14:17:34 +00:00
parent 8195c7d134
commit dceedb11ac

View File

@ -222,7 +222,10 @@ wmud_menu_init(GSList **menu)
return FALSE;
}
/* TODO: free previous menu list, if *menu is not NULL */
if (*menu)
{
wmud_menu_items_free(menu_items);
}
*menu = menu_items;
cmdtable = g_hash_table_new(g_str_hash, g_str_equal);