From 0ad5035457c2f005f8479963e0ac7a3203b7862c Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 2 Jul 2026 08:47:25 +0000 Subject: [PATCH] Do not crash if no client. --- cmd-find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }