about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--view.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/view.c b/view.c
index cb92eee..ac3d495 100644
--- a/view.c
+++ b/view.c
@@ -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) {
/pre>
33352536 ^

5ac07866 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30