Fix client_gb_titlebar with no titlebar case

This commit is contained in:
Martin Duquesnoy 2012-01-29 02:59:38 +01:00
parent 0f3bc2ed0d
commit 9048729876
2 changed files with 3 additions and 3 deletions

View File

@ -153,7 +153,7 @@ client_gb_titlebar(Window w)
{
struct client *c = SLIST_FIRST(&W->h.client);
while(c && c->titlebar->win != w)
while(c && c->titlebar && c->titlebar->win != w)
c = SLIST_NEXT(c, next);
return c;

View File

@ -492,8 +492,6 @@ wmfs_quit(void)
fclose(W->log), W->log = NULL;
W->flags &= ~WMFS_RUNNING;
XCloseDisplay(W->dpy);
}
/** Reload WMFS binary
@ -604,5 +602,7 @@ main(int argc, char **argv)
if(r)
execvp(argv[0], argv);
XCloseDisplay(W->dpy);
return 1;
}