comparison src/popupwin.c @ 18685:ff4174f1ed3a v8.1.2334

patch 8.1.2334: possible NULL pointer dereference in popup_locate() Commit: https://github.com/vim/vim/commit/fd318115a5ee813cba69aa7fc7f5f42f08f10ee4 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 22 19:22:08 2019 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Fri, 22 Nov 2019 19:30:04 +0100
parents 15fe2bd478b0
children b29d8a06e72c
comparison
equal deleted inserted replaced
18684:713c3edb1147 18685:ff4174f1ed3a
2597 int row = tv_get_number(&argvars[0]) - 1; 2597 int row = tv_get_number(&argvars[0]) - 1;
2598 int col = tv_get_number(&argvars[1]) - 1; 2598 int col = tv_get_number(&argvars[1]) - 1;
2599 win_T *wp; 2599 win_T *wp;
2600 2600
2601 wp = mouse_find_win(&row, &col, FIND_POPUP); 2601 wp = mouse_find_win(&row, &col, FIND_POPUP);
2602 if (WIN_IS_POPUP(wp)) 2602 if (wp != NULL && WIN_IS_POPUP(wp))
2603 rettv->vval.v_number = wp->w_id; 2603 rettv->vval.v_number = wp->w_id;
2604 } 2604 }
2605 2605
2606 /* 2606 /*
2607 * For popup_getoptions(): add a "border" or "padding" entry to "dict". 2607 * For popup_getoptions(): add a "border" or "padding" entry to "dict".