From: Dana Jansens Date: Sun, 13 Apr 2003 02:29:09 +0000 (+0000) Subject: allow closing NULL fonts X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=ef1f7b04949317a3ddfdd6c61651eb8ffca18f5f;p=chaz%2Fopenbox allow closing NULL fonts --- 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)