diff --git a/cmd-find.c b/cmd-find.c index d2f902516..555e5f1f0 100644 --- a/cmd-find.c +++ b/cmd-find.c @@ -1011,7 +1011,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; }