mirror of
https://github.com/tmux/tmux.git
synced 2026-07-03 10:22:29 +00:00
Do not crash if no client.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user