From: Bram Moolenaar Date: Thu, 30 May 2019 13:53:29 +0000 (+0200) Subject: patch 8.1.1424: crash when popup menu is deleted while waiting for char X-Git-Tag: v8.1.1424 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c3fb04623d0260762f1c3c1ba250a407098ff2a;p=vim 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 index 9ebf6b7a6..276d49fd0 100644 --- 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 index 2d70ed51d..89068d87a 100644 --- a/src/version.c +++ b/src/version.c @@ -767,6 +767,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1424, /**/ 1423, /**/