[draw] Make sure that font is not NULL before freeing

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-21 17:02:22 +02:00
parent 97525dc0a6
commit b3f8464800
1 changed files with 5 additions and 2 deletions

View File

@ -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