pango r2823 - in trunk: . pango
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2823 - in trunk: . pango
- Date: Sat, 31 Jan 2009 23:35:48 +0000 (UTC)
Author: behdad
Date: Sat Jan 31 23:35:48 2009
New Revision: 2823
URL: http://svn.gnome.org/viewvc/pango?rev=2823&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/pango/pangofc-fontmap.c
Modified: trunk/pango/pangofc-fontmap.c
==============================================================================
--- trunk/pango/pangofc-fontmap.c (original)
+++ trunk/pango/pangofc-fontmap.c Sat Jan 31 23:35:48 2009
@@ -2050,7 +2050,8 @@
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)
{
@@ -2121,8 +2122,8 @@
*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);
@@ -2255,7 +2256,8 @@
*faces = NULL;
*n_faces = 0;
- g_return_if_fail (fcfontmap != NULL);
+ if (G_UNLIKELY (!fcfontmap))
+ return;
priv = fcfontmap->priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]