From 96a7cf1e6a133979eca4d1a8bf0e3bc3887a886d Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 23 Jul 2009 12:33:48 +0000 Subject: 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. --- cmd-attach-session.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd-attach-session.c') diff --git a/cmd-attach-session.c b/cmd-attach-session.c index aae8abe7..2d930560 100644 --- a/cmd-attach-session.c +++ b/cmd-attach-session.c @@ -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')) { /* -- cgit v1.2.3