From efd212bfa25cb44b9499b89f93aa7167a9544ccb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 8 May 2007 16:23:07 +0100 Subject: [PATCH] [cairo-boilerplate] Protect against the nil cairo_scaled_font_t Beware the NULL pointer deference when trying to adjust the max glyph cache size... --- boilerplate/cairo-boilerplate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index 5c86a1d33..093a55aed 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -443,5 +443,8 @@ void cairo_boilerplate_scaled_font_set_max_glyphs_cached (cairo_scaled_font_t *scaled_font, int max_glyphs) { + if (cairo_scaled_font_status (scaled_font)) + return; + scaled_font->glyphs->max_size = max_glyphs; }