summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-10-24 22:22:55 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-10-24 22:24:50 -0400
commitb8ea73664563bd6c83ce4684402c62e10942981e (patch)
tree8cb22da94d97e9630fc77d43dce3e2a2150af35e /pango/pangofc-fontmap.c
parentd334ff1f89a51dde4ce96d7acac2c218be7d7ed5 (diff)
downloadpango-b8ea73664563bd6c83ce4684402c62e10942981e.tar.gz
fc: Be robust against missing format information
Some people have been seeing this assertion getting hit. So don't assert, simply skip fonts that don't have format information. Fixes: https://gitlab.gnome.org/GNOME/pango/issues/431
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index c7193941..2df9d16c 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -835,8 +835,7 @@ filter_fontset_by_format (FcFontSet *fontset)
const char *s;
res = FcPatternGetString (fontset->fonts[i], FC_FONTFORMAT, 0, (FcChar8 **)(void*)&s);
- g_assert (res == FcResultMatch);
- if (pango_fc_is_supported_font_format (s))
+ if (res == FcResultMatch && pango_fc_is_supported_font_format (s))
FcFontSetAdd (result, FcPatternDuplicate (fontset->fonts[i]));
}