fixed crashing bug

This commit is contained in:
Anselm R. Garbe 2006-03-01 17:11:21 +01:00
parent 0a87eed676
commit 7b5978c34b
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ destroy_area(Area *a)
free(a->client); free(a->client);
cext_array_detach((void **)p->area, a, &p->areasz); cext_array_detach((void **)p->area, a, &p->areasz);
p->narea--; p->narea--;
if(p->sel >= p->narea)
p->sel = p->narea - 1;
free(a); free(a);
} }