diff options
| author | Kenichi Handa | 2009-01-19 12:08:31 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-01-19 12:08:31 +0000 |
| commit | 1c0db158ed038b24031ad0b15ba098a1be10a53c (patch) | |
| tree | 575bc4188f3617c7d1228940d689f0203abde59c /src | |
| parent | e0b6e3b945b6c29929c4dfaf1584d61d51e5c233 (diff) | |
| download | emacs-1c0db158ed038b24031ad0b15ba098a1be10a53c.tar.gz emacs-1c0db158ed038b24031ad0b15ba098a1be10a53c.zip | |
(ftfont_lookup_cache): Check the return value of FcFontList.
(ftfont_list): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/ftfont.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 91714a83273..0ba6e2f79b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-01-19 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * ftfont.c (ftfont_lookup_cache): Check the return value of | ||
| 4 | FcFontList. | ||
| 5 | (ftfont_list): Likewise. | ||
| 6 | |||
| 1 | 2009-01-18 Juanma Barranquero <lekktu@gmail.com> | 7 | 2009-01-18 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * dbusbind.c (Fdbus_register_signal): | 9 | * dbusbind.c (Fdbus_register_signal): |
diff --git a/src/ftfont.c b/src/ftfont.c index eb8893965be..b28c4c3ea21 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -310,9 +310,10 @@ ftfont_lookup_cache (key, for_face) | |||
| 310 | FC_INDEX, FcTypeInteger, index, NULL); | 310 | FC_INDEX, FcTypeInteger, index, NULL); |
| 311 | objset = FcObjectSetBuild (FC_CHARSET, NULL); | 311 | objset = FcObjectSetBuild (FC_CHARSET, NULL); |
| 312 | fontset = FcFontList (NULL, pat, objset); | 312 | fontset = FcFontList (NULL, pat, objset); |
| 313 | xassert (fontset && fontset->nfont > 0); | 313 | if (fontset && fontset->nfont > 0 |
| 314 | if (FcPatternGetCharSet (fontset->fonts[0], FC_CHARSET, 0, &charset) | 314 | && (FcPatternGetCharSet (fontset->fonts[0], FC_CHARSET, 0, |
| 315 | == FcResultMatch) | 315 | &charset) |
| 316 | == FcResultMatch)) | ||
| 316 | cache_data->fc_charset = FcCharSetCopy (charset); | 317 | cache_data->fc_charset = FcCharSetCopy (charset); |
| 317 | else | 318 | else |
| 318 | cache_data->fc_charset = FcCharSetCreate (); | 319 | cache_data->fc_charset = FcCharSetCreate (); |
| @@ -835,7 +836,7 @@ ftfont_list (frame, spec) | |||
| 835 | FcPatternAddString (pattern, FC_FAMILY, fam); | 836 | FcPatternAddString (pattern, FC_FAMILY, fam); |
| 836 | FcFontSetDestroy (fontset); | 837 | FcFontSetDestroy (fontset); |
| 837 | fontset = FcFontList (NULL, pattern, objset); | 838 | fontset = FcFontList (NULL, pattern, objset); |
| 838 | if (fontset->nfont > 0) | 839 | if (fontset && fontset->nfont > 0) |
| 839 | break; | 840 | break; |
| 840 | } | 841 | } |
| 841 | } | 842 | } |