summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-split-window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-10-10 12:28:38 +0000
committernicm <nicm@openbsd.org>2013-10-10 12:28:38 +0000
commitf7b1ec399d6ba05789afac2407ebe570a28451d0 (patch)
treef71fece6576d46d618cf488d5402593a346753b1 /usr.bin/tmux/cmd-split-window.c
parentShow session name in detached message. Requested by somebody a few (diff)
downloadwireguard-openbsd-f7b1ec399d6ba05789afac2407ebe570a28451d0.tar.xz
wireguard-openbsd-f7b1ec399d6ba05789afac2407ebe570a28451d0.zip
Don't boke when figuring out working directory from configuration file.
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r--usr.bin/tmux/cmd-split-window.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c
index 290b10a9064..024474f10a5 100644
--- a/usr.bin/tmux/cmd-split-window.c
+++ b/usr.bin/tmux/cmd-split-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-split-window.c,v 1.46 2013/10/10 12:26:35 nicm Exp $ */
+/* $OpenBSD: cmd-split-window.c,v 1.47 2013/10/10 12:28:38 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -103,7 +103,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_ERROR);
}
cwd = fd;
- } else if (cmdq->client->session == NULL)
+ } else if (cmdq->client != NULL && cmdq->client->session == NULL)
cwd = cmdq->client->cwd;
else
cwd = s->cwd;