diff options
author | Mattias Andrée <m@maandree.se> | 2024-10-13 11:17:48 +0200 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2024-10-13 11:17:48 +0200 |
commit | a81c96c0348af8caf6ae45e2d942a676792a2a31 (patch) | |
tree | 24cc725efa3eba381c98ebed7cb2cbf7e0e34f0c /libparsepcf_destroy_preparsed_font.c | |
parent | Update e-mail (diff) | |
download | libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.gz libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.bz2 libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.xz |
Documentation and minor improvements
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libparsepcf_destroy_preparsed_font.c')
-rw-r--r-- | libparsepcf_destroy_preparsed_font.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libparsepcf_destroy_preparsed_font.c b/libparsepcf_destroy_preparsed_font.c index 36ec493..ded8cb7 100644 --- a/libparsepcf_destroy_preparsed_font.c +++ b/libparsepcf_destroy_preparsed_font.c @@ -5,6 +5,8 @@ void libparsepcf_destroy_preparsed_font(struct libparsepcf_font *font) { - free(font->_tables); - memset(font, 0, sizeof(*font)); + if (font) { + free(font->_tables); + *font = (struct libparsepcf_font){0}; + } } |