diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-25 07:14:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 07:14:50 +0800 |
commit | 2f974736ac74bd3cacdb6b2a9b5a47ad18650664 (patch) | |
tree | a4a6ca5c28b2662ff09efc198541bc36b4a54e33 | |
parent | e5490b38b720d04a3361fd83f50099f3a71dd6c1 (diff) | |
download | rneovim-2f974736ac74bd3cacdb6b2a9b5a47ad18650664.tar.gz rneovim-2f974736ac74bd3cacdb6b2a9b5a47ad18650664.tar.bz2 rneovim-2f974736ac74bd3cacdb6b2a9b5a47ad18650664.zip |
fix(coverity): bail out if mouse_find_win() returns NULL (#18726)
-rw-r--r-- | src/nvim/normal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 7c7a042eac..1ba49ea8f3 100644 --- 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; |