about summary refs log tree commit diff stats
path: root/view.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-05 08:37:34 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-05 08:37:34 +0200
commit04f27a54380cbd2bb24d8a86b672af34bb38d2fa (patch)
treee88ed95489b7fd696825be4db3d66555278ce99f /view.c
parent1b3903d6e989ec3933b9f855b73fece050e54155 (diff)
downloaddwm-04f27a54380cbd2bb24d8a86b672af34bb38d2fa.tar.gz
don't access sel in restack without checking for NULL (multihead crashing bug)
Diffstat (limited to 'view.c')
-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) {
6daa488a90dffb60224fcf2b76fbf0'>^
dbf7e03 ^
1076f2b



42277b1 ^
5d3fd37 ^
a2d56f6 ^
99b126d ^

1076f2b
650a1fb ^
1076f2b
95766d6 ^
82064af ^
1076f2b

4d55eee ^
db876f9 ^
dbf7e03 ^

4d55eee ^






dbf7e03 ^

4d55eee ^
dbf7e03 ^
4d55eee ^


dbf7e03 ^
d9386a0 ^
4d55eee ^
dbf7e03 ^

4d55eee ^



dc5c070 ^

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62