diff options
author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-05 08:37:34 +0200 |
---|---|---|
committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-05 08:37:34 +0200 |
commit | 04f27a54380cbd2bb24d8a86b672af34bb38d2fa (patch) | |
tree | e88ed95489b7fd696825be4db3d66555278ce99f /view.c | |
parent | 1b3903d6e989ec3933b9f855b73fece050e54155 (diff) |
don't access sel in restack without checking for NULL (multihead crashing bug)
Diffstat (limited to 'view.c')
-rw-r--r-- | view.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -207,13 +207,15 @@ restack() fi = 0; mi = 2 * f; - if(sel->isfloat || arrange == dofloat) { - wins[fi++] = sel->twin; - wins[fi++] = sel->win; - } - else { - wins[mi++] = sel->twin; - wins[mi++] = sel->win; + if(sel) { + if(sel->isfloat || arrange == dofloat) { + wins[fi++] = sel->twin; + wins[fi++] = sel->win; + } + else { + wins[mi++] = sel->twin; + wins[mi++] = sel->win; + } } for(c = clients; c; c = c->next) if(isvisible(c) && c != sel) { |