NCursesUI::draw_menu: be tolerant when the menu_win was not created

This commit is contained in:
Maxime Coste 2013-07-12 13:15:56 +01:00
parent 1388c0d540
commit fcb3594e4a

View File

@ -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);