From b3f846480009ae9f9cc75b5dae2f8b2436eaa3ed Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 21 May 2008 17:02:22 +0200 Subject: [PATCH] [draw] Make sure that font is not NULL before freeing Signed-off-by: Julien Danjou --- common/draw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/draw.c b/common/draw.c index b7e4ae440..c2fd28dc2 100644 --- a/common/draw.c +++ b/common/draw.c @@ -197,8 +197,11 @@ draw_font_new(xcb_connection_t *conn, int phys_screen, const char *fontname) void draw_font_delete(font_t **font) { - pango_font_description_free((*font)->desc); - p_delete(font); + if(*font) + { + pango_font_description_free((*font)->desc); + p_delete(font); + } } typedef struct