diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-03-31 10:54:37 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-04-07 20:04:33 -0400 |
commit | 3465a945e187bde08c34188eee2dc08ecae778dd (patch) | |
tree | 51ae4f162d2e62cc1bc28245cd0fd2e6869565a8 | |
parent | bddba93949b08e97a7617044e2092a98c3951bb5 (diff) | |
download | rneovim-3465a945e187bde08c34188eee2dc08ecae778dd.tar.gz rneovim-3465a945e187bde08c34188eee2dc08ecae778dd.tar.bz2 rneovim-3465a945e187bde08c34188eee2dc08ecae778dd.zip |
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.
-rw-r--r-- | src/nvim/terminal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index daba7b943f..b3cdfe8775 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -1047,7 +1047,7 @@ static void redraw(bool restore_cursor) setcursor(); } else if (restore_cursor) { ui_cursor_goto(save_row, save_col); - } else { + } else if (term) { // exiting terminal focus, put the window cursor in a valid position int height, width; vterm_get_size(term->vt, &height, &width); |