neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 2f974736ac74bd3cacdb6b2a9b5a47ad18650664
parent e5490b38b720d04a3361fd83f50099f3a71dd6c1
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Wed, 25 May 2022 07:14:50 +0800

fix(coverity): bail out if mouse_find_win() returns NULL (#18726)


Diffstat:
Msrc/nvim/normal.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/nvim/normal.c b/src/nvim/normal.c @@ -1854,6 +1854,9 @@ bool do_mouse(oparg_T *oap, int c, int dir, long count, bool fixindent) int click_row = mouse_row; int click_col = mouse_col; win_T *wp = mouse_find_win(&click_grid, &click_row, &click_col); + if (wp == NULL) { + return false; + } StlClickDefinition *click_defs = in_status_line ? wp->w_status_click_defs : wp->w_winbar_click_defs;