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