From 7b5978c34b907843bf5aac2569199f49c6220076 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Wed, 1 Mar 2006 17:11:21 +0100 Subject: [PATCH] fixed crashing bug --- cmd/wm/area.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/wm/area.c b/cmd/wm/area.c index 600f614b..ceecf698 100644 --- a/cmd/wm/area.c +++ b/cmd/wm/area.c @@ -37,6 +37,8 @@ destroy_area(Area *a) free(a->client); cext_array_detach((void **)p->area, a, &p->areasz); p->narea--; + if(p->sel >= p->narea) + p->sel = p->narea - 1; free(a); }