mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-25 05:15:41 +02:00
font: allow font_destroy() to be called with a NULL pointer
This commit is contained in:
parent
8bc6a0b783
commit
770f2a0e7c
1 changed files with 3 additions and 0 deletions
3
font.c
3
font.c
|
@ -121,6 +121,9 @@ font_clone(const struct font *font)
|
|||
void
|
||||
font_destroy(struct font *font)
|
||||
{
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
cairo_scaled_font_destroy(font->scaled_font);
|
||||
free(font->name);
|
||||
free(font);
|
||||
|
|
Loading…
Add table
Reference in a new issue