diff -urp -x '*~' -x '*.orig' src/fcmatch.c src/fcmatch.c
--- src/fcmatch.c 2010-05-10 15:15:11.983002021 -0700
+++ src/fcmatch.c 2010-05-10 15:15:12.294147068 -0700
@@ -731,6 +731,12 @@ FcFontSetSort (FcConfig *config,
printf ("Sort ");
FcPatternPrint (p);
}
+ if (!config)
+ {
+ config = FcConfigGetCurrent ();
+ if (!config)
+ return 0;
+ }
nnodes = 0;
for (set = 0; set < nsets; set++)
{