commit 1d92df0536d2fff38455c33d054844733e3a3d07
parent 3bbcf9f569d7d99a81fed8b7bc4ff49bf2e3d43c
Author: garbeam <garbeam@mmv.wmii.de>
Date: Fri, 9 Dec 2005 16:52:45 +0200
fixed serious bug in detach_client, if detached client
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -333,9 +333,12 @@ void attach_client(Client * c)
void detach_client(Client *c) {
Page *p;
- Area *a = c->frame->area;
- a->layout->detach(a, c);
- cext_detach_item(&a->clients, c);
+ Frame *f = c->frame;
+ Area *a = f ? f->area : nil;
+ if (a) {
+ a->layout->detach(a, c);
+ cext_detach_item(&a->clients, c);
+ }
if (c->destroyed)
destroy_client(c);
if ((p = get_sel_page()))