mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/183543: Null pointer dereference #9836
Window may disappear, see e7e2115de5
.
This commit is contained in:
parent
d9de4c0efb
commit
fb555c6898
@ -982,6 +982,9 @@ static bool send_mouse_event(Terminal *term, int c)
|
||||
{
|
||||
int row = mouse_row, col = mouse_col, grid = mouse_grid;
|
||||
win_T *mouse_win = mouse_find_win(&grid, &row, &col);
|
||||
if (mouse_win == NULL) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (term->forward_mouse && mouse_win->w_buffer->terminal == term) {
|
||||
// event in the terminal window and mouse events was enabled by the
|
||||
@ -1029,6 +1032,7 @@ static bool send_mouse_event(Terminal *term, int c)
|
||||
return mouse_win == curwin;
|
||||
}
|
||||
|
||||
end:
|
||||
ins_char_typebuf(c);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user