[pango/simple-fontmap: 8/37] fonts: Fix get_face default impl




commit a7fc02c0ebbb57654318eca7d5aceac3a57f5cbf
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 9 20:01:29 2022 -0500

    fonts: Fix get_face default impl

 pango/fonts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pango/fonts.c b/pango/fonts.c
index dffdca0c..1f0ee626 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -2462,7 +2462,7 @@ pango_font_family_real_get_face (PangoFontFamily *family,
   pango_font_family_list_faces (family, &faces, &n_faces);
 
   face = NULL;
-  if (name == NULL)
+  if (name == NULL && n_faces > 0)
     {
       face = faces[0];
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]