aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2019-10-14 09:24:06 +0000
committernicm <nicm>2019-10-14 09:24:06 +0000
commitb598bbcc2e8b26855e4d34dfff9c222c28080cd7 (patch)
tree4bd9b68635462b5eb3bc2ccc3b086f85bdb07bcf
parentf18cd5b19c3c8e3941c714f9d7e51914fb5d81f0 (diff)
downloadrtmux-b598bbcc2e8b26855e4d34dfff9c222c28080cd7.tar.gz
rtmux-b598bbcc2e8b26855e4d34dfff9c222c28080cd7.tar.bz2
rtmux-b598bbcc2e8b26855e4d34dfff9c222c28080cd7.zip
Do not crash with pane_current_command if the pane is newly created and
has no shell set, from Thomas Adam.
-rw-r--r--format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/format.c b/format.c
index 581fa582..dd69512f 100644
--- a/format.c
+++ b/format.c
@@ -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);