Do not check for NULL after dereferencing, from alexarama at yahoo dot

com in GitHub issue 5051.
This commit is contained in:
nicm
2026-05-03 14:57:09 +00:00
parent 49172b256c
commit 1e96d9a87f

View File

@@ -1998,13 +1998,15 @@ struct style_range *
window_pane_border_status_get_range(struct window_pane *wp, u_int x, u_int y) window_pane_border_status_get_range(struct window_pane *wp, u_int x, u_int y)
{ {
struct style_ranges *srs; struct style_ranges *srs;
struct window *w = wp->window; struct window *w;
struct options *wo = w->options; struct options *wo;
u_int line; u_int line;
int pane_status; int pane_status;
if (wp == NULL) if (wp == NULL)
return (NULL); return (NULL);
w = wp->window;
wo = w->options;
srs = &wp->border_status_line.ranges; srs = &wp->border_status_line.ranges;
pane_status = options_get_number(wo, "pane-border-status"); pane_status = options_get_number(wo, "pane-border-status");