From fcb3594e4a6995c3f6fc9695ac51616da7cce6e4 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 12 Jul 2013 13:15:56 +0100 Subject: [PATCH] NCursesUI::draw_menu: be tolerant when the menu_win was not created --- src/ncurses.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ncurses.cc b/src/ncurses.cc index 420d8d25..c4e2ffd7 100644 --- a/src/ncurses.cc +++ b/src/ncurses.cc @@ -370,7 +370,10 @@ void NCursesUI::print_status(const DisplayLine& status) void NCursesUI::draw_menu() { - kak_assert(m_menu_win); + // menu show may have not created the window if it did not fit. + // so be tolerant. + if (not m_menu_win) + return; auto menu_fg = get_color_pair(m_menu_fg); auto menu_bg = get_color_pair(m_menu_bg);