diff options
author | 2009-07-23 12:33:48 +0000 | |
---|---|---|
committer | 2009-07-23 12:33:48 +0000 | |
commit | ca6e6a1fa746a19284ccb0d21adb45e45ed5f581 (patch) | |
tree | 6b027142ff96b9019ec1193aa8ec8b36b9ad6fbe /usr.bin/tmux/cmd-attach-session.c | |
parent | knexthop_compare() failed to compare correctly and because of this it was (diff) | |
download | wireguard-openbsd-ca6e6a1fa746a19284ccb0d21adb45e45ed5f581.tar.xz wireguard-openbsd-ca6e6a1fa746a19284ccb0d21adb45e45ed5f581.zip |
Both of cmdclient and curclient CAN be NULL - if the command is executed from
the configuration file. In this case, attach-session can't do much, and
new-session should just assume -d.
Diffstat (limited to 'usr.bin/tmux/cmd-attach-session.c')
-rw-r--r-- | usr.bin/tmux/cmd-attach-session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c index 5e8a5cbd997..5e6454e81bf 100644 --- a/usr.bin/tmux/cmd-attach-session.c +++ b/usr.bin/tmux/cmd-attach-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-attach-session.c,v 1.4 2009/07/17 15:03:11 nicm Exp $ */ +/* $OpenBSD: cmd-attach-session.c,v 1.5 2009/07/23 12:33:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -55,6 +55,9 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx) if ((s = cmd_find_session(ctx, data->target)) == NULL) return (-1); + if (ctx->cmdclient == NULL && ctx->curclient == NULL) + return (0); + if (ctx->cmdclient == NULL) { if (data->chflags & CMD_CHFLAG('d')) { /* |