diff options
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r-- | src/nvim/menu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 000377a997..0fa45ac24a 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -1449,9 +1449,11 @@ void show_popupmenu(void) } // Only show a popup when it is defined and has entries - if (menu != NULL && menu->children != NULL) { - pum_show_popupmenu(menu); + if (menu == NULL || menu->children == NULL) { + return; } + + pum_show_popupmenu(menu); } /// Execute "menu". Use by ":emenu" and the window toolbar. |