Fix possible segfault when no [selbar] in config
This commit is contained in:
parent
891760bfac
commit
c8bb465bb0
@ -1186,7 +1186,6 @@ uicb_clientlist(uicb_t cmd)
|
||||
int n = 0;
|
||||
Window w;
|
||||
Client *c = NULL;
|
||||
Bool is_sel;
|
||||
|
||||
for(c = clients; c; c = c->next)
|
||||
if(c->tag == seltag[selscreen] && c->screen == selscreen)
|
||||
|
||||
@ -176,7 +176,6 @@ conf_bar_section(void)
|
||||
conf.bars.height = fetch_opt_first(bar, "-1", "height").num;
|
||||
conf.colors.bar = getcolor(fetch_opt_first(bar, "#000000", "bg").str);
|
||||
conf.colors.text = fetch_opt_first(bar, "#ffffff", "fg").str;
|
||||
conf.bars.selbar = fetch_opt_first(bar, "false", "selbar").bool;
|
||||
|
||||
mouse = fetch_section(bar, "mouse");
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ buttonpress(XButtonEvent *ev)
|
||||
conf.bars.mouse[j].func(conf.bars.mouse[j].cmd);
|
||||
|
||||
/* Selbar */
|
||||
if(ev->window == infobar[selscreen].selbar->win)
|
||||
if(conf.bars.selbar && ev->window == infobar[selscreen].selbar->win)
|
||||
for(i = 0; i < conf.selbar.nmouse; ++i)
|
||||
if(conf.selbar.mouse[i].tag == seltag[conf.selbar.mouse[i].screen]
|
||||
|| conf.selbar.mouse[i].tag < 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user