allow closing NULL fonts
This commit is contained in:
parent
2d9c03a441
commit
ef1f7b0494
1 changed files with 4 additions and 2 deletions
|
@ -68,8 +68,10 @@ ObFont *font_open(char *fontstring)
|
|||
|
||||
void font_close(ObFont *f)
|
||||
{
|
||||
XftFontClose(ob_display, f->xftfont);
|
||||
g_free(f);
|
||||
if (f) {
|
||||
XftFontClose(ob_display, f->xftfont);
|
||||
g_free(f);
|
||||
}
|
||||
}
|
||||
|
||||
int font_measure_string(ObFont *f, char *str, int shadow, int offset)
|
||||
|
|
Loading…
Reference in a new issue