# HG changeset patch # User Bram Moolenaar # Date 1559224807 -7200 # Node ID d4c50bca8dbca5a25cdf4394bc2039afff46652d # Parent 536acf59c7279ec32bd83ceef8dff0a286666ceb patch 8.1.1424: crash when popup menu is deleted while waiting for char commit https://github.com/vim/vim/commit/5c3fb04623d0260762f1c3c1ba250a407098ff2a Author: Bram Moolenaar Date: Thu May 30 15:53:29 2019 +0200 patch 8.1.1424: crash when popup menu is deleted while waiting for char Problem: Crash when popup menu is deleted while waiting for char. Solution: Bail out when pum_array was cleared. diff --git a/src/popupmnu.c b/src/popupmnu.c --- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -1302,7 +1302,10 @@ pum_show_popupmenu(vimmenu_T *menu) out_flush(); c = vgetc(); - if (c == ESC || c == Ctrl_C) + + // Bail out when typing Esc, CTRL-C or some callback closed the popup + // menu. + if (c == ESC || c == Ctrl_C || pum_array == NULL) break; else if (c == CAR || c == NL) { diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1424, +/**/ 1423, /**/ 1422,