dwm-meillo

changeset 414:c6ffcc201229

don't access sel in restack without checking for NULL (multihead crashing bug)
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 05 Sep 2006 08:37:34 +0200
parents 761d0cd6e504
children ad2b6ce6e95b
files view.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/view.c	Tue Sep 05 08:24:00 2006 +0200
     1.2 +++ b/view.c	Tue Sep 05 08:37:34 2006 +0200
     1.3 @@ -207,13 +207,15 @@
     1.4  
     1.5  	fi = 0;
     1.6  	mi = 2 * f;
     1.7 -	if(sel->isfloat || arrange == dofloat) {
     1.8 -		wins[fi++] = sel->twin;
     1.9 -		wins[fi++] = sel->win;
    1.10 -	}
    1.11 -	else {
    1.12 -		wins[mi++] = sel->twin;
    1.13 -		wins[mi++] = sel->win;
    1.14 +	if(sel) {
    1.15 +		if(sel->isfloat || arrange == dofloat) {
    1.16 +			wins[fi++] = sel->twin;
    1.17 +			wins[fi++] = sel->win;
    1.18 +		}
    1.19 +		else {
    1.20 +			wins[mi++] = sel->twin;
    1.21 +			wins[mi++] = sel->win;
    1.22 +		}
    1.23  	}
    1.24  	for(c = clients; c; c = c->next)
    1.25  		if(isvisible(c) && c != sel) {