From b7cc218a036b6cbf0db28f08c4f84615fc7ac680 Mon Sep 17 00:00:00 2001 From: Dane Jensen Date: Mon, 18 May 2026 17:14:19 -0700 Subject: [PATCH] Fixed null dereference. --- window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/window.c b/window.c index 88269c35..051daed8 100644 --- a/window.c +++ b/window.c @@ -2188,7 +2188,7 @@ window_pane_float_geometry(struct window *w, struct window_pane *wp, u_int x, y, sx, sy; const u_int cx = 4, cy = 2; - if ((wp->flags & PANE_SAVED_FLOAT) && + if (wp != NULL && (wp->flags & PANE_SAVED_FLOAT) && !args_has(args, 'x') && !args_has(args, 'y') && !args_has(args, 'X') && !args_has(args, 'Y')) { x = wp->saved_float_xoff; @@ -2198,7 +2198,7 @@ window_pane_float_geometry(struct window *w, struct window_pane *wp, goto out; } - /* Default size */ + /* Default size. */ sx = w->sx / 2; sy = w->sy / 2; @@ -2215,7 +2215,7 @@ window_pane_float_geometry(struct window *w, struct window_pane *wp, return (-1); } - /* Position defaults to cascading when not defined */ + /* Position defaults to cascading when not defined. */ if (args_has(args, 'X')) { x = args_percentage_and_expand(args, 'X', 0, USHRT_MAX, w->sx, item, cause);