From 41fb7b6a30cf69f40604285389a1e5a7d5f7d8b9 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Fri, 15 Feb 2008 20:22:08 +0000 Subject: [PATCH] 2008-02-15 Matthew Allum * clutter/pango/pangoclutter-render.c: (draw_glyph): More safety checks (#796, Tero Saarni) --- ChangeLog | 5 +++++ clutter/pango/pangoclutter-render.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51f946bcd..9515035a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-15 Matthew Allum + + * clutter/pango/pangoclutter-render.c: (draw_glyph): + More safety checks (#796, Tero Saarni) + 2008-02-15 Chris Lord * clutter/clutter-entry.c: diff --git a/clutter/pango/pangoclutter-render.c b/clutter/pango/pangoclutter-render.c index 0f9262111..4b9fba18c 100644 --- a/clutter/pango/pangoclutter-render.c +++ b/clutter/pango/pangoclutter-render.c @@ -351,8 +351,12 @@ draw_glyph (PangoRenderer *renderer_, if (bm.width < 1 || bm.height < 1 || bm.bitmap == NULL) { - x += g->left; - y -= g->top; + /* Safety on */ + if (g) + { + x += g->left; + y -= g->top; + } return; }