ui/ncurses: unpost ncurses menu in pmenu cleanup path
authorJeremy Kerr <jk@ozlabs.org>
Thu, 13 Mar 2014 05:23:37 +0000 (13:23 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 10 Apr 2014 03:18:25 +0000 (11:18 +0800)
We need to unpost the menu so that free_item can actually free the item.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-menu.c

index 745c1ff15f2a6cba0d7f71caac91b902e2795893..8738c48a2e77f46bb319056291b9930266ad41f0 100644 (file)
@@ -367,6 +367,7 @@ void pmenu_delete(struct pmenu *menu)
        assert(menu->scr.sig == pb_pmenu_sig);
        menu->scr.sig = pb_removed_sig;
 
+       unpost_menu(menu->ncm);
        free_menu(menu->ncm);
        delwin(menu->scr.sub_ncw);
        delwin(menu->scr.main_ncw);