]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccache.c
Make file_stat argument to FcDirCacheLoadFile optional.
[fontconfig.git] / src / fccache.c
index bd8db460d60513170a45d5a907813b1ef99d0d0e..c24b06184a120a6571cee4e749473fc81e47fe34 100644 (file)
@@ -559,7 +559,10 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat)
 {
     int        fd;
     FcCache *cache;
+    struct stat        my_file_stat;
 
+    if (!file_stat)
+       file_stat = &my_file_stat;
     fd = FcDirCacheOpenFile (cache_file, file_stat);
     if (fd < 0)
        return NULL;