diff --git a/render/font.c b/render/font.c index 5f0dbf8b..c1139d6e 100644 --- a/render/font.c +++ b/render/font.c @@ -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)