commit 1f64e630ca6cf16427f3d21c93445d653df64ae3 parent de2c95793ef858d837a50b57028bff55f831bc4d Author: Anselm R. Garbe <garbeam@wmii.de> Date: Thu, 9 Mar 2006 12:38:02 +0100 focus(Client *c) function is now safer if the client is not attached Diffstat:
| cmd/wm/client.c | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -532,8 +532,13 @@ resize_all_clients() void focus(Client *c) { - Frame *f = c->frame[c->sel]; - Tag *t = f->area->tag; + Frame *f = c->nframe ? c->frame[c->sel] : nil; + Tag *t; + + if(!f) + return; + + t = f->area->tag; if(tag[sel] != t) focus_tag(t); focus_client(c);