FcConfigAppFontClear: Support passing NULL to use default config.
authorManish Singh <yosh@gimp.org>
Mon, 1 Sep 2003 05:11:17 +0000 (05:11 +0000)
committerManish Singh <yosh@gimp.org>
Mon, 1 Sep 2003 05:11:17 +0000 (05:11 +0000)
ChangeLog
src/fccfg.c

index d265c74..79ca94a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-31  Manish Singh  <yosh@gimp.org>
+
+       * src/fccfg.c (FcConfigAppFontClear): Support passing NULL to
+       use default config.
+
 2003-08-15  Carl Worth  <cworth@isi.edu>
 
        * src/fcxml.c (FcEditDestroy): Fix leak of FcEdit.
index 12cad84..f393c79 100644 (file)
@@ -1727,6 +1727,13 @@ FcConfigAppFontAddDir (FcConfig      *config,
 void
 FcConfigAppFontClear (FcConfig     *config)
 {
+    if (!config)
+    {
+       config = FcConfigGetCurrent ();
+       if (!config)
+           return;
+    }
+
     FcConfigSetFonts (config, 0, FcSetApplication);
 }