From 04f27a54380cbd2bb24d8a86b672af34bb38d2fa Mon Sep 17 00:00:00 2001 From: Anselm R. Garbe Date: Tue, 5 Sep 2006 08:37:34 +0200 Subject: don't access sel in restack without checking for NULL (multihead crashing bug) --- view.c | 16 +++++++++------- 1 file 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) { -- cgit v1.2.3