From 69fa11af8f622e834ff1757bdab15703cf6f231a Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 22 Sep 2009 15:51:55 +0200 Subject: [PATCH] screen: only untag if client had a screen Signed-off-by: Julien Danjou --- screen.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/screen.c b/screen.c index 316562b9..865ef397 100644 --- a/screen.c +++ b/screen.c @@ -273,9 +273,10 @@ screen_client_moveto(client_t *c, screen_t *new_screen, bool doresize) if(c->titlebar) c->titlebar->screen = new_screen; - /* remove old tags */ - foreach(old_tag, old_screen->tags) - untag_client(c, *old_tag); + /* If client was on a screen, remove old tags */ + if(old_screen) + foreach(old_tag, old_screen->tags) + untag_client(c, *old_tag); if(!doresize) {