Fix segfault.
This commit is contained in:
parent
c4d3b6dad0
commit
e0421d0289
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-28 Patrick Lam <plam@mit.edu>
|
||||||
|
* src/fccfg.c (FcConfigBuildFonts):
|
||||||
|
|
||||||
|
Fix segfault.
|
||||||
|
|
||||||
2005-11-28 Patrick Lam <plam@mit.edu>
|
2005-11-28 Patrick Lam <plam@mit.edu>
|
||||||
* src/fcint.h:
|
* src/fcint.h:
|
||||||
* src/fcpat.c (FcPatternFindFullFname):
|
* src/fcpat.c (FcPatternFindFullFname):
|
||||||
|
|
|
@ -308,8 +308,11 @@ FcConfigBuildFonts (FcConfig *config)
|
||||||
|
|
||||||
for (i = 0; i < cached_fonts->nfont; i++)
|
for (i = 0; i < cached_fonts->nfont; i++)
|
||||||
{
|
{
|
||||||
|
const char * cfn = (FcChar8 *)FcPatternFindFullFname
|
||||||
|
(cached_fonts->fonts[i]);
|
||||||
|
|
||||||
if (FcConfigAcceptFont (config, cached_fonts->fonts[i]) &&
|
if (FcConfigAcceptFont (config, cached_fonts->fonts[i]) &&
|
||||||
FcConfigAcceptFilename (config, (FcChar8 *)FcPatternFindFullFname(cached_fonts->fonts[i])))
|
(cfn && FcConfigAcceptFilename (config, cfn)))
|
||||||
FcFontSetAdd (fonts, cached_fonts->fonts[i]);
|
FcFontSetAdd (fonts, cached_fonts->fonts[i]);
|
||||||
|
|
||||||
cached_fonts->fonts[i] = 0; /* prevent free in FcFontSetDestroy */
|
cached_fonts->fonts[i] = 0; /* prevent free in FcFontSetDestroy */
|
||||||
|
|
Loading…
Reference in New Issue