From 1e96d9a87f00e49e6996672c85464d1e9e42c414 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 3 May 2026 14:57:09 +0000 Subject: [PATCH] Do not check for NULL after dereferencing, from alexarama at yahoo dot com in GitHub issue 5051. --- window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/window.c b/window.c index 00dafb52..a3b602fd 100644 --- a/window.c +++ b/window.c @@ -1998,13 +1998,15 @@ struct style_range * window_pane_border_status_get_range(struct window_pane *wp, u_int x, u_int y) { struct style_ranges *srs; - struct window *w = wp->window; - struct options *wo = w->options; + struct window *w; + struct options *wo; u_int line; int pane_status; if (wp == NULL) return (NULL); + w = wp->window; + wo = w->options; srs = &wp->border_status_line.ranges; pane_status = options_get_number(wo, "pane-border-status");