diff options
author | 2017-04-21 22:23:24 +0000 | |
---|---|---|
committer | 2017-04-21 22:23:24 +0000 | |
commit | d655f0832a469a8492b8c657c76dfd5d94990278 (patch) | |
tree | e5ddde6804d8f6c3517d9626608a22cc0a30936e /usr.bin/tmux/cmd-queue.c | |
parent | Make sure cmd_find_from_* clear the state if they fail. (diff) | |
download | wireguard-openbsd-d655f0832a469a8492b8c657c76dfd5d94990278.tar.xz wireguard-openbsd-d655f0832a469a8492b8c657c76dfd5d94990278.zip |
Log error properly when no current state, and some other minor tweaks.
Diffstat (limited to 'usr.bin/tmux/cmd-queue.c')
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index eb039be743c..639dbe688bc 100644 --- a/usr.bin/tmux/cmd-queue.c +++ b/usr.bin/tmux/cmd-queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-queue.c,v 1.52 2017/04/21 20:34:05 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.53 2017/04/21 22:23:24 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -203,14 +203,14 @@ cmdq_fire_command(struct cmdq_item *item) flags = !!(cmd->flags & CMD_CONTROL); cmdq_guard(item, "begin", flags); + if (item->client == NULL) + item->client = cmd_find_client(item, NULL, 1); + if (cmd_prepare_state(cmd, item) != 0) { retval = CMD_RETURN_ERROR; goto out; } - if (item->client == NULL) - item->client = cmd_find_client(item, NULL, 1); - retval = cmd->entry->exec(cmd, item); if (retval == CMD_RETURN_ERROR) goto out; |