diff --git a/cmd-find.c b/cmd-find.c index 88a276b39..7ce714583 100644 --- a/cmd-find.c +++ b/cmd-find.c @@ -1012,7 +1012,7 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item, strcmp(target, "{active}") == 0 || strcmp(target, "{current}") == 0) { c = cmdq_get_client(item); - if (c == NULL) { + if (c == NULL || c->session == NULL) { cmdq_error(item, "no current client"); goto error; }