From d89bad393cdaade2e2b2cbb7616df64c846ad631 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 9 Jun 2026 08:11:53 +0000 Subject: [PATCH] Do not use NULL arguments, bug spotted by Dane Jensen. --- usr.bin/tmux/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index cd5cbb26935..7968061e02b 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.331 2026/06/08 23:06:21 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.332 2026/06/09 08:11:53 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1233,7 +1233,7 @@ window_pane_set_mode(struct window_pane *wp, struct window_pane *swp, TAILQ_INSERT_HEAD(&wp->modes, wme, entry); wme->screen = wme->mode->init(wme, fs, args); } - wme->kill = args_has(args, 'k'); + wme->kill = args != NULL ? args_has(args, 'k') : 0; wp->screen = wme->screen; wp->flags |= (PANE_REDRAW|PANE_REDRAWSCROLLBAR|PANE_CHANGED);