+2009-01-31 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/pangofc-fontmap.c (pango_fc_face_describe),
+ (pango_fc_face_list_sizes), (pango_fc_family_list_faces):
+ It's not a programming error if face->family is NULL or
+ family->fontmap is NULL. Be graceful.
+
2009-01-30 Behdad Esfahbod <behdad@gnome.org>
Bug 569763 – pango doesn't like font descriptions without family!
FcPattern *match_pattern;
FcPattern *result_pattern;
- g_return_val_if_fail (fcfamily != NULL, NULL);
+ if (G_UNLIKELY (!fcfamily))
+ return pango_font_description_new ();
if (fcface->fake)
{
*sizes = NULL;
*n_sizes = 0;
- g_return_if_fail (fcface->family != NULL);
- g_return_if_fail (fcface->family->fontmap != NULL);
+ if (G_UNLIKELY (!fcface->family || !fcface->family->fontmap))
+ return;
pattern = FcPatternCreate ();
FcPatternAddString (pattern, FC_FAMILY, (FcChar8*)(void*)fcface->family->family_name);
*faces = NULL;
*n_faces = 0;
- g_return_if_fail (fcfontmap != NULL);
+ if (G_UNLIKELY (!fcfontmap))
+ return;
priv = fcfontmap->priv;