From 14761d5b086be24cb09414a38e6761e312ff24d4 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 14 Oct 2019 09:24:07 +0000 Subject: Do not crash with pane_current_command if the pane is newly created and has no shell set, from Thomas Adam. --- usr.bin/tmux/format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/format.c') diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index e68d833cc1d..b54e2e5ee0d 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.211 2019/09/24 14:50:08 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.212 2019/10/14 09:24:06 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -574,7 +574,7 @@ format_cb_current_command(struct format_tree *ft, struct format_entry *fe) struct window_pane *wp = ft->wp; char *cmd; - if (wp == NULL) + if (wp == NULL || wp->shell == NULL) return; cmd = get_proc_name(wp->fd, wp->tty); -- cgit v1.2.3