* src/ui/window.c (window_display_buffer): Make sure t is only
dereference if not NULL even in case of fatal crash.
* src/ui/window.c (set_window_display_buffer): Ditto.
* src/ui/window.c (window_display_lines): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
t = find_window_mirror(w);
if (!t)
abort();
-
- if (which == CURRENT_DISP)
+ else if (which == CURRENT_DISP)
return t->current_display_lines;
else if (which == DESIRED_DISP)
return t->desired_display_lines;
t = find_window_mirror(w);
if (!t)
abort();
-
- return t->buffer;
+ else
+ return t->buffer;
}
void set_window_display_buffer(struct window *w, struct buffer *b)
t = find_window_mirror(w);
if (!t)
abort();
-
- t->buffer = b;
+ else
+ t->buffer = b;
}
\f
/* Determining a window's position based solely on its pixel