mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: terminal.c: redraw(): Np dereference: RI.
Problem : Dereference of null pointer @ 1053. Diagnostic : Real issue. Rationale : Branch "Exiting focused terminal" can actually be executed when term is NULL. Resolution : Guard branch with term check.
This commit is contained in:
parent
bddba93949
commit
3465a945e1
@ -1047,7 +1047,7 @@ static void redraw(bool restore_cursor)
|
|||||||
setcursor();
|
setcursor();
|
||||||
} else if (restore_cursor) {
|
} else if (restore_cursor) {
|
||||||
ui_cursor_goto(save_row, save_col);
|
ui_cursor_goto(save_row, save_col);
|
||||||
} else {
|
} else if (term) {
|
||||||
// exiting terminal focus, put the window cursor in a valid position
|
// exiting terminal focus, put the window cursor in a valid position
|
||||||
int height, width;
|
int height, width;
|
||||||
vterm_get_size(term->vt, &height, &width);
|
vterm_get_size(term->vt, &height, &width);
|
||||||
|
Loading…
Reference in New Issue
Block a user