[draw] Make sure that font is not NULL before freeing
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
97525dc0a6
commit
b3f8464800
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue