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:
Eliseo Martínez 2015-03-31 10:54:37 +02:00 committed by Justin M. Keyes
parent bddba93949
commit 3465a945e1

View File

@ -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);