add title null check
This commit is contained in:
parent
d10dcaef22
commit
0e94de9304
1 changed files with 1 additions and 1 deletions
2
dam.c
2
dam.c
|
@ -169,7 +169,7 @@ bar_draw(Bar *bar)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((w = bar->width - tw - x) > bar->height) {
|
if ((w = bar->width - tw - x) > bar->height) {
|
||||||
if (*bar->title != '\0') {
|
if (bar->title && *bar->title != '\0') {
|
||||||
drwl_setscheme(bar->drw, colors[bar->selected ? SchemeSel : SchemeNorm]);
|
drwl_setscheme(bar->drw, colors[bar->selected ? SchemeSel : SchemeNorm]);
|
||||||
drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->title, 0);
|
drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->title, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue