]> git.wh0rd.org - fontconfig.git/blobdiff - src/fclist.c
Implement fc-list --verbose (#13015)
[fontconfig.git] / src / fclist.c
index a0306caf58b9d4be66b1d844b376352c321c4196..2a53b79866699fcd3632b6e650d94a8f7c804d58 100644 (file)
@@ -457,6 +457,7 @@ FcFontSetList (FcConfig         *config,
     FcListHashTable table;
     int                    i;
     FcListBucket    *bucket;
+    int             destroy_os = 0;
 
     if (!config)
     {
@@ -468,6 +469,13 @@ FcFontSetList (FcConfig        *config,
            goto bail0;
     }
     FcListHashTableInit (&table);
+
+    if (!os)
+    {
+       os = FcObjectGetSet ();
+       destroy_os = 1;
+    }
+
     /*
      * Walk all available fonts adding those that
      * match to the hash table
@@ -532,6 +540,8 @@ bail2:
 bail1:
     FcListHashTableCleanup (&table);
 bail0:
+    if (destroy_os)
+       FcObjectSetDestroy (os);
     return 0;
 }