Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1c0db158
Commit
1c0db158
authored
Jan 19, 2009
by
Kenichi Handa
Browse files
(ftfont_lookup_cache): Check the return value of FcFontList.
(ftfont_list): Likewise.
parent
e0b6e3b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
src/ChangeLog
src/ChangeLog
+6
-0
src/ftfont.c
src/ftfont.c
+5
-4
No files found.
src/ChangeLog
View file @
1c0db158
2009-01-19 Kenichi Handa <handa@m17n.org>
* ftfont.c (ftfont_lookup_cache): Check the return value of
FcFontList.
(ftfont_list): Likewise.
2009-01-18 Juanma Barranquero <lekktu@gmail.com>
* dbusbind.c (Fdbus_register_signal):
...
...
src/ftfont.c
View file @
1c0db158
...
...
@@ -310,9 +310,10 @@ ftfont_lookup_cache (key, for_face)
FC_INDEX
,
FcTypeInteger
,
index
,
NULL
);
objset
=
FcObjectSetBuild
(
FC_CHARSET
,
NULL
);
fontset
=
FcFontList
(
NULL
,
pat
,
objset
);
xassert
(
fontset
&&
fontset
->
nfont
>
0
);
if
(
FcPatternGetCharSet
(
fontset
->
fonts
[
0
],
FC_CHARSET
,
0
,
&
charset
)
==
FcResultMatch
)
if
(
fontset
&&
fontset
->
nfont
>
0
&&
(
FcPatternGetCharSet
(
fontset
->
fonts
[
0
],
FC_CHARSET
,
0
,
&
charset
)
==
FcResultMatch
))
cache_data
->
fc_charset
=
FcCharSetCopy
(
charset
);
else
cache_data
->
fc_charset
=
FcCharSetCreate
();
...
...
@@ -835,7 +836,7 @@ ftfont_list (frame, spec)
FcPatternAddString (pattern, FC_FAMILY, fam);
FcFontSetDestroy (fontset);
fontset = FcFontList (NULL, pattern, objset);
if (fontset->nfont > 0)
if (fontset
&& fontset
->nfont > 0)
break;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment