diff options
Diffstat (limited to 'usr.bin/tmux/cmd-queue.c')
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index b955918b98a..1aca7393cd7 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.99 2020/07/27 08:03:10 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.100 2020/11/30 13:37:45 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -768,7 +768,11 @@ cmdq_running(struct client *c) { struct cmdq_list *queue = cmdq_get(c); - return (queue->item); + if (queue->item == NULL) + return (NULL); + if (queue->item->flags & CMDQ_WAITING) + return (NULL); + return (queue->item); } /* Print a guard line. */ |