From bbf203a8387ca3e0b0a93c08aa89d543fc56ebc2 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 8 Sep 2014 21:24:27 +0000 Subject: move the check for an empty queue up during cycle --- client.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index c2e13db..64c8d08 100644 --- a/client.c +++ b/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.180 2014/09/08 21:15:14 okan Exp $ + * $OpenBSD: client.c,v 1.181 2014/09/08 21:24:27 okan Exp $ */ #include @@ -639,12 +639,10 @@ client_cycle(struct screen_ctx *sc, int flags) struct client_ctx *oldcc, *newcc; int again = 1; - oldcc = client_current(); - - /* If no windows then you cant cycle */ if (TAILQ_EMPTY(&sc->clientq)) return; + oldcc = client_current(); if (oldcc == NULL) oldcc = (flags & CWM_RCYCLE ? TAILQ_LAST(&sc->clientq, client_ctx_q) : -- cgit v1.2.3-2-gb3c3