projects
/
platform
/
upstream
/
fontconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c34c0c
)
Reference patterns in FcCacheCopySet.
author
Keith Packard
<keithp@neko.keithp.com>
Thu, 7 Sep 2006 21:22:16 +0000
(14:22 -0700)
committer
Keith Packard
<keithp@neko.keithp.com>
Thu, 7 Sep 2006 21:22:16 +0000
(14:22 -0700)
As patterns are put into the font set copy, mark them as referenced so the
cache stays around while the font set is in use.
src/fccache.c
patch
|
blob
|
history
diff --git
a/src/fccache.c
b/src/fccache.c
index
e4b04fc
..
11f88a7
100644
(file)
--- a/
src/fccache.c
+++ b/
src/fccache.c
@@
-816,11
+816,16
@@
FcCacheCopySet args(const FcCache *c)
if (!new)
return NULL;
for (i = 0; i < old->nfont; i++)
- if (!FcFontSetAdd (new, FcFontSetFont (old, i)))
+ {
+ FcPattern *font = FcFontSetFont (old, i);
+
+ FcPatternReference (font);
+ if (!FcFontSetAdd (new, font))
{
FcFontSetDestroy (new);
return NULL;
}
+ }
return new;
}