]> Dogcows Code - chaz/openbox/commitdiff
allow closing NULL fonts
authorDana Jansens <danakj@orodu.net>
Sun, 13 Apr 2003 02:29:09 +0000 (02:29 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 13 Apr 2003 02:29:09 +0000 (02:29 +0000)
render/font.c

index 5f0dbf8ba5cfb08868fd0e3f6af6ad242f741b3f..c1139d6e70468ee3dba6583a3a7d70f8bac3a397 100644 (file)
@@ -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)
This page took 0.029422 seconds and 4 git commands to generate.