[titlebar] Fix segfault when the ttbar height = 0

This commit is contained in:
Martin Duquesnoy
2008-10-12 12:32:58 +02:00
parent 3c4742b986
commit fab7efa473
2 changed files with 7 additions and 3 deletions

View File

@@ -310,9 +310,10 @@ expose(XEvent ev)
if(ev.xexpose.count == 0
&& (ev.xexpose.window == bar->win))
updatebar();
for(c = clients; c; c = c->next)
if(ev.xexpose.window == c->tbar->win)
updatetitle(c);
if(conf.ttbarheight)
for(c = clients; c; c = c->next)
if(ev.xexpose.window == c->tbar->win)
updatetitle(c);
return;
}

3
wmfs.c
View File

@@ -236,6 +236,9 @@ gettbar(Window w)
{
Client *c;
if(!conf.ttbarheight)
return NULL;
for(c = clients; c && c->tbar->win != w; c = c->next);
return c;