[pango] [pango-context] Fix assertion with enable_fallback=FALSE and no fonts



commit 3241972c4f4d9c1d98d166c38cb0d7b12afb5545
Author: Behdad Esfahbod <behdad behdad org>
Date:   Tue Mar 17 12:05:34 2009 -0400

    [pango-context] Fix assertion with enable_fallback=FALSE and no fonts
---
 pango/pango-context.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pango/pango-context.c b/pango/pango-context.c
index 208952d..9285581 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1067,6 +1067,9 @@ get_shaper_and_font_foreach (PangoFontset *fontset G_GNUC_UNUSED,
   GetShaperFontInfo *info = data;
   GSList *l;
 
+  if (G_UNLIKELY (!font))
+    return FALSE;
+
   for (l = info->engines; l; l = l->next)
     {
       PangoEngineShape *engine = l->data;



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