patch 8.1.2334: possible NULL pointer dereference in popup_locate()
Problem: Possible NULL pointer dereference in popup_locate(). (Coverity)
Solution: Check for NULL pointer.
diff --git a/src/popupwin.c b/src/popupwin.c
index efcc395..3b808e2 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -2599,7 +2599,7 @@
win_T *wp;
wp = mouse_find_win(&row, &col, FIND_POPUP);
- if (WIN_IS_POPUP(wp))
+ if (wp != NULL && WIN_IS_POPUP(wp))
rettv->vval.v_number = wp->w_id;
}
diff --git a/src/version.c b/src/version.c
index 9037349..c327f98 100644
--- a/src/version.c
+++ b/src/version.c
@@ -738,6 +738,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2334,
+/**/
2333,
/**/
2332,