--- a/view.c Tue Sep 05 08:24:00 2006 +0200
+++ b/view.c Tue Sep 05 08:37:34 2006 +0200
@@ -207,13 +207,15 @@
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) {