0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

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.
This commit is contained in:
Bram Moolenaar 2019-11-22 19:22:08 +01:00
parent 828ffd5963
commit fd318115a5
2 changed files with 3 additions and 1 deletions

View File

@ -2599,7 +2599,7 @@ f_popup_locate(typval_T *argvars, typval_T *rettv)
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;
}

View File

@ -737,6 +737,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2334,
/**/
2333,
/**/