From 5508a565a10eeb5e061d28cacd780dfa57f400cc Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Mon, 6 Feb 2012 09:57:06 +0100 Subject: [PATCH] Test W->client in tag_client* uicbs --- src/tag.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tag.c b/src/tag.c index 5a695fd..f414e5e 100644 --- a/src/tag.c +++ b/src/tag.c @@ -181,7 +181,7 @@ uicb_tag_client(Uicb cmd) struct tag *t; int id = ATOI(cmd); - if((t = tag_gb_id(W->screen, id))) + if(W->client && (t = tag_gb_id(W->screen, id))) tag_client(t, W->client); } @@ -191,6 +191,9 @@ uicb_tag_move_client_next(Uicb cmd) (void)cmd; struct tag *t; + if(!W->client) + return; + if((t = TAILQ_NEXT(W->screen->seltag, next))) tag_client(t, W->client); else if( /* CIRCULAR OPTION */ 1) @@ -203,6 +206,9 @@ uicb_tag_move_client_prev(Uicb cmd) (void)cmd; struct tag *t; + if(!W->client) + return; + if((t = TAILQ_PREV(W->screen->seltag, tsub, next))) tag_client(t, W->client); else if( /* CIRCULAR OPTION */ 1)