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 9ebf6b7..276d49f 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -1302,7 +1302,10 @@
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 2d70ed5..89068d8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1424,
+/**/
1423,
/**/
1422,