summaryrefslogtreecommitdiff
path: root/src/popupwin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-22 19:22:08 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-22 19:22:08 +0100
commitfd318115a5ee813cba69aa7fc7f5f42f08f10ee4 (patch)
tree370e8f8846be090afb874d1a47db52d41d838a82 /src/popupwin.c
parent828ffd596394f714270a01a55fc3f949a8bd9b35 (diff)
downloadvim-git-fd318115a5ee813cba69aa7fc7f5f42f08f10ee4.tar.gz
patch 8.1.2334: possible NULL pointer dereference in popup_locate()v8.1.2334
Problem: Possible NULL pointer dereference in popup_locate(). (Coverity) Solution: Check for NULL pointer.
Diffstat (limited to 'src/popupwin.c')
-rw-r--r--src/popupwin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index efcc39598..3b808e2e3 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -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;
}